개정판 458667db
line no fix
Change-Id: I5edc3926242996ada8314ad36b4ef63333108707
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
251 | 251 |
_from.owner = line_no |
252 | 252 |
_to.owner = line_no |
253 | 253 |
line_no._fixed = True |
254 |
|
|
255 |
if displayMessage: displayMessage.emit('{} {}'.format(line_no.text(), 'Topology Construction')) |
|
256 |
self.find_primary_lines(line_no, include_signal=False) |
|
257 |
if updateProgress: updateProgress.emit(self.maxValue) |
|
258 | 254 |
else: |
259 | 255 |
remainLineNo1.append(line_no) |
260 | 256 |
|
261 |
for line_no in self.remainLineNo1:
|
|
257 |
for line_no in remainLineNo1: |
|
262 | 258 |
if _from: |
263 | 259 |
_from.owner = line_no |
264 | 260 |
line_no.set_property('To', None) |
265 | 261 |
line_no._fixed = True if len([conn for conn in _from.connectors if conn.connectedItem]) == 1 else False |
266 |
|
|
267 |
if displayMessage: displayMessage.emit('{} {}'.format(line_no.text(), 'Topology Construction')) |
|
268 |
self.find_primary_lines(line_no, include_signal=False) |
|
269 |
if updateProgress: updateProgress.emit(self.maxValue) |
|
270 | 262 |
else: |
271 | 263 |
remainLineNo2.append(line_no) |
272 | 264 |
|
273 |
for line_no in self.remainLineNo2:
|
|
265 |
for line_no in remainLineNo2: |
|
274 | 266 |
line_no.set_property('From', None) |
275 | 267 |
line_no.set_property('To', None) |
276 | 268 |
line_no._fixed = False |
... | ... | |
278 | 270 |
remainVertical = [] |
279 | 271 |
remainVertical2 = [] |
280 | 272 |
remainHorizontal = [] |
281 |
for line_no in self.remainLineNo2:
|
|
273 |
for line_no in remainLineNo2: |
|
282 | 274 |
if line_no.angle == 0: |
283 | 275 |
remainHorizontal.append(line_no) |
284 | 276 |
else: |
... | ... | |
307 | 299 |
if (startLine is not None) and (minDist < toler): |
308 | 300 |
vertical.conns.append(startLine) |
309 | 301 |
startLine.owner = vertical |
310 |
|
|
311 |
if displayMessage: displayMessage.emit('{} {}'.format(vertical.text(), 'Topology Construction')) |
|
312 |
self.find_primary_lines(vertical, include_signal=False) |
|
313 |
if updateProgress: updateProgress.emit(self.maxValue) |
|
314 | 302 |
else: |
315 | 303 |
remainVertical2.append(vertical) |
316 | 304 |
|
... | ... | |
342 | 330 |
horizontal.conns.append(startLine) |
343 | 331 |
startLine.owner = horizontal |
344 | 332 |
|
345 |
if displayMessage: displayMessage.emit('{} {}'.format(horizontal.text(), 'Topology Construction')) |
|
346 |
self.find_primary_lines(horizontal, include_signal=False) |
|
347 |
if updateProgress: updateProgress.emit(self.maxValue) |
|
348 |
|
|
349 | 333 |
if horizontal: |
350 | 334 |
remainHorizontal.remove(horizontal) |
351 | 335 |
else: |
... | ... | |
374 | 358 |
remain.conns.append(startLine) |
375 | 359 |
startLine.owner = remain |
376 | 360 |
|
377 |
if displayMessage: displayMessage.emit('{} {}'.format(remain.text(), 'Topology Construction')) |
|
378 |
self.find_primary_lines(remain, include_signal=False) |
|
379 |
if updateProgress: updateProgress.emit(self.maxValue) |
|
380 | 361 |
else: |
381 | 362 |
remainVertical2.append(remain) |
382 | 363 |
|
... | ... | |
384 | 365 |
remainVertical.remove(remain) |
385 | 366 |
else: |
386 | 367 |
break |
368 |
|
|
369 |
# sort line no with from,to value |
|
370 |
self._lineNos.sort( |
|
371 |
key=lambda line_no: (1 if line_no.prop('From') else 0) + (1 if line_no.prop('To') else 0), |
|
372 |
reverse=True) |
|
373 |
for lineno in self._lineNos: |
|
374 |
if displayMessage: displayMessage.emit('{} {}'.format(lineno.text(), 'Topology Construction')) |
|
375 |
self.find_primary_lines(lineno, include_signal=False) |
|
376 |
if updateProgress: updateProgress.emit(self.maxValue) |
|
387 | 377 |
# up to here |
388 | 378 |
|
389 | 379 |
# find secondary lines |
내보내기 Unified diff