개정판 9f0c0eb8
issue #563: disable consumed in symbols function, but text need consumed
Change-Id: I72f4add0773aec54ab5b1da3d8cd736f113f8a07
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
1094 | 1094 |
import math |
1095 | 1095 |
from TextInfo import TextInfo |
1096 | 1096 |
|
1097 |
print('flag') |
|
1098 |
|
|
1099 | 1097 |
"""load texts""" |
1100 | 1098 |
worker.add_predata_to_scene.emit(app_doc_data.activeDrawing, worker.text_scene, False, True, False, False, False) |
1101 | 1099 |
worker.cond.wait(worker.mutex) |
... | ... | |
1157 | 1155 |
if not worker.isTextChecked: |
1158 | 1156 |
textInfoList.clear() |
1159 | 1157 |
# up to here |
1160 |
print('flag2') |
|
1161 | 1158 |
|
1162 | 1159 |
removedSymbolImgPath = os.path.join(project.getTempPath(), os.path.basename(mainRes)) |
1163 | 1160 |
cv2.imwrite(removedSymbolImgPath, app_doc_data.imgSrc) |
... | ... | |
1174 | 1171 |
Worker.recognizeLine(mainRes, listWidget, worker.scene, worker) |
1175 | 1172 |
else: |
1176 | 1173 |
"""load lines""" |
1177 |
print('flag3') |
|
1178 | 1174 |
worker.add_predata_to_scene.emit(app_doc_data.activeDrawing, worker.line_scene, False, False, True, False, False) |
1179 | 1175 |
worker.cond.wait(worker.mutex) |
1180 | 1176 |
"""up to here""" |
... | ... | |
1246 | 1242 |
|
1247 | 1243 |
# detect flange |
1248 | 1244 |
flange_list = [] |
1249 |
|
|
1245 |
print('flag3.9') |
|
1250 | 1246 |
configs = app_doc_data.getConfigs('Project', 'Operation') |
1251 | 1247 |
instrument = int(configs[0].value) if configs else 1 |
1252 | 1248 |
if app_doc_data.lines: |
... | ... | |
1261 | 1257 |
-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
1262 | 1258 |
worker.displayLog.emit(MessageType.Error, message) |
1263 | 1259 |
# up to here |
1264 |
|
|
1260 |
print('flag3.98') |
|
1265 | 1261 |
# connect line to line |
1266 | 1262 |
try: |
1267 | 1263 |
for line in app_doc_data.lines: |
... | ... | |
1270 | 1266 |
|
1271 | 1267 |
for match in matches: |
1272 | 1268 |
detector.connectLineToLine(match, line, toler) |
1273 |
|
|
1269 |
print('flag3.989') |
|
1274 | 1270 |
# change line type using symbol connection type(info) |
1275 | 1271 |
for sym in symbols: |
1276 | 1272 |
if sym.conn_type: |
... | ... | |
1284 | 1280 |
f"{sys.exc_info()[-1].tb_lineno}" |
1285 | 1281 |
worker.displayLog.emit(MessageType.Error, message) |
1286 | 1282 |
# up to here |
1287 |
|
|
1283 |
print('flag3.99') |
|
1288 | 1284 |
# detect flange |
1289 | 1285 |
try: |
1290 | 1286 |
if instrument == 1: |
... | ... | |
1325 | 1321 |
# up to here |
1326 | 1322 |
|
1327 | 1323 |
# change line type using visual pattern |
1328 |
print('flag4') |
|
1329 | 1324 |
try: |
1330 | 1325 |
lines = [] |
1331 | 1326 |
for sym in symbols: |
... | ... | |
1352 | 1347 |
worker.create_unknown_items(mainRes) |
1353 | 1348 |
worker.add_detected_items_to_scene.emit(worker.scene, flange_list) |
1354 | 1349 |
worker.cond.wait(worker.mutex) |
1355 |
print('flag5') |
|
1356 | 1350 |
|
1357 | 1351 |
# run preset |
1358 | 1352 |
presets = app_doc_data.getSymbolPreset() |
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
232 | 232 |
res = [] |
233 | 233 |
for symbol in [x for x in self.associations() if |
234 | 234 |
issubclass(type(x), SymbolSvgItem) or type(x) is QEngineeringVendorItem or type(x) is QEngineeringLineItem]: |
235 |
''' |
|
235 | 236 |
consumed = False |
236 | 237 |
for key in list(self.attrs.keys()): |
237 | 238 |
if key.AssocItem and key.AssocItem is symbol: |
238 | 239 |
consumed = True |
239 | 240 |
if not consumed: |
240 | 241 |
res.append(symbol) |
242 |
''' |
|
243 |
res.append(symbol) |
|
241 | 244 |
|
242 | 245 |
return res |
243 | 246 |
|
내보내기 Unified diff