Changeset View
Changeset View
Standalone View
Standalone View
io_convert_image_to_mesh_img/import_img.py
| Context not available. | |||||
| self.__cropXY = False | self.__cropXY = False | ||||
| def bin_mode(self, bin_mode=None): | def bin_mode(self, bin_mode=None): | ||||
| if bin_mode != None: | if bin_mode is not None: | ||||
| self.__bin_mode = bin_mode | self.__bin_mode = bin_mode | ||||
| return self.__bin_mode | return self.__bin_mode | ||||
| Context not available. | |||||
| x = 0 | x = 0 | ||||
| point_offset += len( last_line ) - last_line.count(None) | point_offset += len( last_line ) - last_line.count(None) | ||||
| for z in last_line: | for z in last_line: | ||||
| if z != None: | if z is not None: | ||||
| coords.append( (x*scale_x, 0.0, z) ) | coords.append( (x*scale_x, 0.0, z) ) | ||||
| coord += 1 | coord += 1 | ||||
| x += 1 | x += 1 | ||||
| Context not available. | |||||
| # TODO: turn this into a map | # TODO: turn this into a map | ||||
| x = 0 | x = 0 | ||||
| for z in dtm_line: | for z in dtm_line: | ||||
| if z != None: | if z is not None: | ||||
| coords.append( (x*scale_x, y_val, z) ) | coords.append( (x*scale_x, y_val, z) ) | ||||
| coord += 1 | coord += 1 | ||||
| x += 1 | x += 1 | ||||
| Context not available. | |||||
| # TODO: implement a triangular face | # TODO: implement a triangular face | ||||
| pass | pass | ||||
| if vals[1] != None: | if vals[1] is not None: | ||||
| previous_point_offset += 1 | previous_point_offset += 1 | ||||
| if vals[2] != None: | if vals[2] is not None: | ||||
| point_offset += 1 | point_offset += 1 | ||||
| # Squeeze the last point offset increment out of the previous line | # Squeeze the last point offset increment out of the previous line | ||||
| if last_line[-1] != None: | if last_line[-1] is not None: | ||||
| previous_point_offset += 1 | previous_point_offset += 1 | ||||
| # Squeeze the last point out of the current line | # Squeeze the last point out of the current line | ||||
| if dtm_line[-1] != None: | if dtm_line[-1] is not None: | ||||
| point_offset += 1 | point_offset += 1 | ||||
| # remember what we just saw (and forget anything before that) | # remember what we just saw (and forget anything before that) | ||||
| Context not available. | |||||