개정판 6ac63897
apply line type conditions at recognition and fix invalid line filter
Change-Id: Ia2b035cf8f51e31d661adc0d68ad3c418437f5e4
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
1419 | 1419 |
f"{sys.exc_info()[-1].tb_lineno}" |
1420 | 1420 |
worker.displayLog.emit(MessageType.Error, message) |
1421 | 1421 |
# up to here |
1422 |
|
|
1423 |
# change line type using line type contidion |
|
1424 |
try: |
|
1425 |
for line in reversed(app_doc_data.lines): |
|
1426 |
line.update_line_type() |
|
1427 |
except Exception as ex: |
|
1428 |
message = f"error occurred({repr(ex)}) in {sys.exc_info()[-1].tb_frame.f_code.co_filename}:" \ |
|
1429 |
f"{sys.exc_info()[-1].tb_lineno}" |
|
1430 |
worker.displayLog.emit(MessageType.Error, message) |
|
1431 |
# up to here |
|
1432 |
|
|
1422 | 1433 |
print('flag4') |
1423 | 1434 |
worker.create_unknown_items(mainRes) |
1424 | 1435 |
worker.add_detected_items_to_scene.emit(worker.scene, [flange_list, blind_list]) |
... | ... | |
4201 | 4212 |
# remove lines which is located inside symbol |
4202 | 4213 |
for symbol in app_doc_data.symbols: |
4203 | 4214 |
rect = symbol.sceneBoundingRect() |
4204 |
rect.adjust(int(rect.width() / -10), int(rect.height() / -10), int(rect.width() / 10), int(rect.height() / 10)) |
|
4215 |
# rect.adjust(int(rect.width() / -10), int(rect.height() / -10), int(rect.width() / 10), int(rect.height() / 10))
|
|
4205 | 4216 |
matches = [line for line in app_doc_data.lines if rect.contains(line.line().p1()) and |
4206 | 4217 |
rect.contains(line.line().p2())]# and not line.has_connection] |
4207 | 4218 |
for line in matches: |
내보내기 Unified diff