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