개정판 38f2d1d3
issue #000: fix off
Change-Id: I174b2b55b1ed921e896f7302084c26787f8b635d
DTI_PID/DTI_PID/ImportTextFromCADDialog.py | ||
---|---|---|
194 | 194 |
self.on_load_symbol_mapping() |
195 | 195 |
|
196 | 196 |
app_doc_data = AppDocData.instance() |
197 |
self.drawing_height = app_doc_data.activeDrawing.image.shape[1] |
|
197 |
#self.drawing_height = app_doc_data.activeDrawing.image.shape[1]
|
|
198 | 198 |
|
199 | 199 |
configs = app_doc_data.getConfigs('Cad Offset', 'X') |
200 | 200 |
self.ui.spinBoxX.setValue(int(configs[0].value)) if 1 == len(configs) else \ |
... | ... | |
793 | 793 |
try: |
794 | 794 |
scale_x = max([id2_bbox[2] / autocad_bbox[2], id2_bbox[3] / autocad_bbox[3]]) if self.ui.doubleSpinBox.value() < 1 else self.ui.doubleSpinBox.value() |
795 | 795 |
scale_y = max([id2_bbox[2] / autocad_bbox[2], id2_bbox[3] / autocad_bbox[3]]) if self.ui.doubleSpinBox_2.value() < 1 else self.ui.doubleSpinBox_2.value() |
796 |
#offsets = [id2_bbox[0] - autocad_bbox[0] * scale_x, (id2_bbox[1] + id2_bbox[3]) - autocad_bbox[1] * scale_y]
|
|
797 |
offsets = [self.ui.spinBoxTextX.value(), self.drawing_height + self.ui.spinBoxTextY.value()] |
|
796 |
offsets = [id2_bbox[0] - autocad_bbox[0] * scale_x, (id2_bbox[1] + id2_bbox[3]) - autocad_bbox[1] * scale_y] |
|
797 |
#offsets = [self.ui.spinBoxTextX.value(), self.drawing_height + self.ui.spinBoxTextY.value()]
|
|
798 | 798 |
|
799 | 799 |
name = blk_ref_node.attrib['Name'] |
800 | 800 |
origin = convert_to_image_coords((float(blk_ref_node.attrib['X']), float(blk_ref_node.attrib['Y'])), |
... | ... | |
869 | 869 |
try: |
870 | 870 |
scale_x = max([id2_bbox[2] / autocad_bbox[2], id2_bbox[3] / autocad_bbox[3]]) if self.ui.doubleSpinBox.value() < 1 else self.ui.doubleSpinBox.value() |
871 | 871 |
scale_y = max([id2_bbox[2] / autocad_bbox[2], id2_bbox[3] / autocad_bbox[3]]) if self.ui.doubleSpinBox_2.value() < 1 else self.ui.doubleSpinBox_2.value() |
872 |
#offsets = [id2_bbox[0] - autocad_bbox[0] * scale_x, (id2_bbox[1] + id2_bbox[3]) - autocad_bbox[1] * scale_y]
|
|
873 |
offsets = [self.ui.spinBoxTextX.value(), self.drawing_height + self.ui.spinBoxTextY.value()] |
|
872 |
offsets = [id2_bbox[0] - autocad_bbox[0] * scale_x, (id2_bbox[1] + id2_bbox[3]) - autocad_bbox[1] * scale_y] |
|
873 |
#offsets = [self.ui.spinBoxTextX.value(), self.drawing_height + self.ui.spinBoxTextY.value()]
|
|
874 | 874 |
|
875 | 875 |
loc = [float(text_node.attrib['X']) * scale_x + offsets[0], -float(text_node.attrib['Y']) * scale_y + offsets[1]] |
876 | 876 |
|
... | ... | |
937 | 937 |
try: |
938 | 938 |
scale_x = max([id2_bbox[2] / autocad_bbox[2], id2_bbox[3] / autocad_bbox[3]]) if self.ui.doubleSpinBox.value() < 1 else self.ui.doubleSpinBox.value() |
939 | 939 |
scale_y = max([id2_bbox[2] / autocad_bbox[2], id2_bbox[3] / autocad_bbox[3]]) if self.ui.doubleSpinBox_2.value() < 1 else self.ui.doubleSpinBox_2.value() |
940 |
#offsets = [id2_bbox[0] - autocad_bbox[0] * scale_x, (id2_bbox[1] + id2_bbox[3]) - autocad_bbox[1] * scale_y]
|
|
941 |
offsets = [self.ui.spinBoxX.value(), self.drawing_height + self.ui.spinBoxX.value()] |
|
940 |
offsets = [id2_bbox[0] - autocad_bbox[0] * scale_x, (id2_bbox[1] + id2_bbox[3]) - autocad_bbox[1] * scale_y] |
|
941 |
#offsets = [self.ui.spinBoxX.value(), self.drawing_height + self.ui.spinBoxX.value()]
|
|
942 | 942 |
|
943 | 943 |
pts = [] |
944 | 944 |
for vertex in line_node.iter('Vertex'): |
내보내기 Unified diff