개정판 6b21c988
fix LineNoTracer
Change-Id: I691b4f8e6de8274a3bda06f55615d80e46ba52ba
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
382 | 382 |
x not in visited) and obj.is_connected(x, None)] |
383 | 383 |
nextMatches = symbolMatches + lineMatches |
384 | 384 |
|
385 |
if visited: # symbol must pass straight
|
|
385 |
if len(visited) > 1 and len(nextMatches) > 1: # symbol must pass straight, choose one if connected items are more than 2
|
|
386 | 386 |
matches = [x for x in visited if obj.is_connected(x)] |
387 | 387 |
if matches: |
388 | 388 |
next_connected = [x for x in nextMatches if obj.next_connected(x, matches[0])] |
... | ... | |
393 | 393 |
#nextMatches = [nextMatches[0]] |
394 | 394 |
nextMatches = [] |
395 | 395 |
else: |
396 |
if len(nextMatches) > 1: # choose one if connected items are more than 2 |
|
397 |
matches = [x for x in visited if obj.is_connected(x)] |
|
398 |
if matches: |
|
399 |
next_connected = [x for x in nextMatches if obj.next_connected(x, matches[0])] |
|
400 |
|
|
401 |
if next_connected: |
|
402 |
nextMatches = next_connected |
|
403 |
else: |
|
404 |
#nextMatches = [nextMatches[0]] |
|
405 |
nextMatches = [] |
|
396 |
if len(nextMatches) > 1: # select by connection index |
|
397 |
next_connected = [conn.connectedItem for conn in obj.connectors if conn.connectedItem and conn.connectedItem in nextMatches] |
|
398 |
if next_connected: |
|
399 |
nextMatches = [next_connected[0]] |
|
400 |
else: |
|
401 |
nextMatches = [] |
|
406 | 402 |
|
407 | 403 |
# if obj symbol has break connector and nextMatch connected that connector than break line group |
408 | 404 |
if nextMatches and obj.break_connector and [index for index in obj.break_connector if |
내보내기 Unified diff