프로젝트

일반

사용자정보

개정판 11ec0f83

ID11ec0f83c69d6931440dc2c44c06c0d1dafd3e0f
상위 339bcec7
하위 61b7725a

humkyung 이(가) 6년 이상 전에 추가함

...

차이점 보기:

DTI_PID/DTI_PID/DTI_PID.py
502 502
    threadLock.acquire()
503 503
    srcName = os.path.splitext(os.path.basename(mainRes))[0]    
504 504
    listWidget.addItem('Finish symbol   : ' + os.path.basename(symbolPath.replace('.png', '')) + ' - (' + str(foundSymbolCount) + ')')
505
    f = open(os.path.dirname(os.path.realpath(__file__)) + "\\res\\Result\\result_"+srcName+"_600dpi.txt", 'a+')
506
    data = 'symbolName - (count) : ' + symbolPath + ' - (' + str(foundSymbolCount) + ') / avgMpCount : '+str(avgMpCount)+'\n'
507
    f.write(data)
508
    f.close()
509 505
    threadLock.release()
510 506

  
511 507
def removeDetectedSymbol(sym):
DTI_PID/DTI_PID/LineNoTracer.py
61 61
                for lineno in docData.lineNos:
62 62
                    if 1 == len(lineno.conns):
63 63
                        lineno.conns[0].owner = lineno  # set conns's owner to line no
64
                        self.findConnectedObjects(lineno, lineno.conns[0], toler=10)
65
                        connectedItems = lineno.getConnectedItems()
64
                        connectedItems = self.findConnectedObjects(lineno.conns[0], toler=10)
66 65
                        for item in connectedItems: item.owner = lineno # set item's owner
67 66
                        
68 67
                        connectedLines = [item for item in connectedItems if type(item) is QEngineeringLineItem]
......
84 83
                    matches = [x for x in self._lines if x.owner is not None and x.isConnectable(line)]
85 84
                    if matches:
86 85
                        connectedItems = self.findConnectedObjects(line, toler=10)
87
                        for item in connectedItems: item.owner = matches[0]
86
                        for item in connectedItems: item.owner = matches[0].owner
88 87

  
89 88
                        connectedLines = [item for item in connectedItems if type(item) is QEngineeringLineItem]
90 89
                        
......
107 106
        @history    humkyung 2018.05.08 find symbol or line connected to given object
108 107
                    humkyung 2018.05.10 set found object's owner
109 108
    '''
110
    def findConnectedObjects(self, owner, startLine, toler):
109
    def findConnectedObjects(self, startLine, toler):
111 110
        from QEngineeringLineItem import QEngineeringLineItem
112 111
        from SymbolSvgItem import SymbolSvgItem
113 112

  
......
130 129
                pool.append(match)
131 130
                visited.append(match)
132 131

  
133
        return visited
132
        return visited

내보내기 Unified diff

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