개정판 11ec0f83
...
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