프로젝트

일반

사용자정보

개정판 8a48a60b

ID8a48a60b53948afeb227d37472560dfe8fdd032c
상위 c0817882
하위 4ac6ddd5

백흠경이(가) 약 6년 전에 추가함

issue #563: stop primary line tracing when meet equipment

차이점 보기:

DTI_PID/DTI_PID/LineNoTracer.py
309 309
    '''
310 310
    def findConnectedObjects(self, startLine, toler):
311 311
        from EngineeringLineItem import QEngineeringLineItem
312
        from EngineeringEquipmentItem import QEngineeringEquipmentItem
312 313
        from SymbolSvgItem import SymbolSvgItem
313 314

  
314 315
        visited = [startLine]
......
329 330

  
330 331
                # order connected objects
331 332
                matches = []
332
                matches.extend(symbolMatches)
333
                matches.extend([x for x in symbolMatches if not issubclass(type(x), QEngineeringEquipmentItem)])    # except equipment
333 334
                matches.extend(lineMatches)
334 335

  
335 336
                # specBreak 확인
DTI_PID/DTI_PID/Shapes/EngineeringEquipmentItem.py
108 108
                    else:
109 109
                        _attrs[attr] = ''
110 110
                else:
111
                    _attrs[attr] = ''#self.attrs[attr[1]] if attr[1] in self.attrs.keys() else ''
111
                    matches = [prop for prop in self.attrs if prop.UID == attr.UID]
112
                    if len(matches) == 1:
113
                        _attrs[matches[0]] = self.attrs[matches[0]]
114
                    else:
115
                        _attrs[attr] = ''
112 116
        except Exception as ex:
113 117
            from App import App 
114 118
            from AppDocData import MessageType
DTI_PID/DTI_PID/potrace.py
74 74
        svgFile.write(ET.tostring(svg, encoding='utf-8').decode('utf-8').replace('ns0:', '').replace(':ns0', ''))
75 75
        svgFile.close()
76 76
    except Exception as ex:
77
        print(ex)
77
        from App import App
78
        from AppDocData import MessageType
79

  
80
        message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
81
        App.mainWnd().addMessage.emit(MessageType.Error, message)
78 82

  
79 83
if __name__ == '__main__':
80 84
    execpath = os.path.dirname(os.path.realpath(__file__))

내보내기 Unified diff