프로젝트

일반

사용자정보

개정판 277e2991

ID277e299132051b34bbaf1668abf4afb6509507e4
상위 d5cb1694
하위 b671d8b5

gaqhf 이(가) 약 5년 전에 추가함

dev issue #663 : detect flange 작업 전

Change-Id: I7361a55f43f0061642627067038563cd9b424062

차이점 보기:

DTI_PID/DTI_PID/RecognitionDialog.py
1245 1245
                        worker.displayLog.emit(MessageType.Error, message)
1246 1246
                    # up to here
1247 1247

  
1248
                    # TODO: detect flange
1248 1249
                    # detect flange
1249 1250
                    for sym in symbols:
1250 1251
                        Worker.detectFlangeOnPid(sym)
......
1831 1832
        return results
1832 1833

  
1833 1834
    @staticmethod
1834
    def detectFlangeOnPid(sym):
1835
    def detectFlangeOnPid(symbol):
1835 1836
        img = app_doc_data.activeDrawing.image_origin
1836 1837

  
1838
        connPts = []
1839
        if symbol.getConnectionPoint() is not None and symbol.getConnectionPoint() != '':
1840
            for param in symbol.getConnectionPoint().split('/'):
1841
                tokens = param.split(',')
1842
                connPts.append(
1843
                    ('AUTO', pt[0] + float(tokens[0]), pt[1] + float(tokens[1]), '0') if len(tokens) == 2 else \
1844
                        (tokens[0], pt[0] + float(tokens[1]), pt[1] + float(tokens[2]), '0') if len(
1845
                            tokens) == 3 else \
1846
                            (tokens[0], pt[0] + float(tokens[1]), pt[1] + float(tokens[2]), tokens[3]) if len(
1847
                                tokens) == 4 else None)
1837 1848

  
1838 1849

  
1839 1850
        return None

내보내기 Unified diff