프로젝트

일반

사용자정보

개정판 7c851884

ID7c8518843808e06479c9118d60dd59620874fed7
상위 55ee6103
하위 fe4163b5

함의성이(가) 약 2년 전에 추가함

fix cad text

Change-Id: I4ec5a01c0fe1325ee5c1d61903f139be3a1b7fd2

차이점 보기:

DTI_PID/DTI_PID/ImportTextFromCADDialog.py
1140 1140
                    """up to here"""
1141 1141

  
1142 1142
                    """add text, line and symbol from autocad file to id2 xml file"""
1143
                    if 'Text' in will_be_converted_items: # text for attrdef
1144
                        for record in autocad_xml_root.iter('AcDbAttributeDefinition'):
1145
                            for record in autocad_xml_root.iter('AcDbText'):
1146
                                if record.attrib['Layer'] not in exclude_layers:
1147
                                    node = self.text_to_xml(record)
1148
                                    if node:
1149
                                        textInfo.append(node)
1143
                    #if 'Text' in will_be_converted_items: # text for attrdef
1144
                    #    for record in autocad_xml_root.iter('AcDbAttributeDefinition'):
1145
                    #        for record in autocad_xml_root.iter('AcDbText'):
1146
                    #            if record.attrib['Layer'] not in exclude_layers:
1147
                    #                node = self.text_to_xml(record)
1148
                    #                if node:
1149
                    #                    textInfo.append(node)
1150 1150

  
1151 1151
                    for blk_tbl_record in autocad_xml_root.iter('AcDbBlockTableRecord'):
1152 1152
                        if blk_tbl_record.attrib['Name'].upper() != '*Model_Space'.upper() or \
......
1469 1469
            loc = self.convert_to_image_coords([float(text_node.attrib['X']), float(text_node.attrib['Y'])])
1470 1470

  
1471 1471
            text = text_node.text
1472
            #if text == '323001B':
1473
            #    print('a')
1472
            if not text.replace(' ', '').replace('\n', ''):
1473
                return
1474
            if text == 'PID-1104':
1475
                print('a')
1474 1476
            angle = round(float(text_node.attrib['Angle']), 2)
1475 1477
            if 'IsMirroredInX' in text_node.attrib and text_node.attrib['IsMirroredInX'] == 'True':
1476 1478
                if abs(math.pi * 0.5 - angle) < 0.01 or abs(math.pi * 1.5 - angle) < 0.01:

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)