개정판 188b6fce
cad spec test label remain
Change-Id: Ia8af545fc50bfa981cb1708b2f14c18701d33d4b
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
973 | 973 |
for conn in symbol.connectors: |
974 | 974 |
dist = originPoint.distance(Point(conn.sceneConnectPoint[0], conn.sceneConnectPoint[1])) |
975 | 975 |
if not conn.connectedItem or not issubclass(type(conn.connectedItem), QEngineeringAbstractItem) or \ |
976 |
[pair for pair in usedItemPairs if symbol in pair and conn.connectedItem in pair] or dist > 5 * toler or dist > minD:
|
|
976 |
[pair for pair in usedItemPairs if symbol in pair and conn.connectedItem in pair] or dist > dist_range or dist > minD:
|
|
977 | 977 |
continue |
978 | 978 |
|
979 | 979 |
minD = dist |
... | ... | |
985 | 985 |
dist = originPoint.distance(Point(conn.sceneConnectPoint[0], conn.sceneConnectPoint[1])) |
986 | 986 |
if not conn.connectedItem or not issubclass(type(conn.connectedItem), QEngineeringAbstractItem) or \ |
987 | 987 |
conn._connected_at != QEngineeringAbstractItem.CONNECTED_AT_BODY or \ |
988 |
[pair for pair in usedItemPairs if line in pair and conn.connectedItem in pair] or dist > 5 * toler or dist > minD + 1:
|
|
988 |
[pair for pair in usedItemPairs if line in pair and conn.connectedItem in pair] or dist > dist_range or dist > minD + 1:
|
|
989 | 989 |
continue |
990 | 990 |
|
991 | 991 |
minD = dist |
... | ... | |
1011 | 1011 |
usedItemPairs.append([upItem, downItem]) |
1012 | 1012 |
|
1013 | 1013 |
for attribute_table_item in attribute_table_item_list: |
1014 |
for text in attribute_table_item[1]: |
|
1015 |
attribute_table_item[1].sort(key=lambda x: originPoint.distance(Point(x.center().x(), x.center().Y()))) |
|
1016 |
if originPoint.distance(Point(attribute_table_item[1][1].center().x(), attribute_table_item[1][1].center().Y())) < dist_range: |
|
1017 |
if issubclass(type(upItem), SymbolSvgItem): |
|
1018 |
pass |
|
1019 |
elif issubclass(type(downItem), SymbolSvgItem): |
|
1020 |
pass |
|
1014 |
upText = None |
|
1015 |
downText = None |
|
1016 |
attribute_table_item[1].sort(key=lambda x: originPoint.distance(Point(x.center().x(), x.center().y()))) |
|
1017 |
if originPoint.distance(Point(attribute_table_item[1][1].center().x(), attribute_table_item[1][1].center().y())) < dist_range: |
|
1018 |
if issubclass(type(upItem), SymbolSvgItem): |
|
1019 |
symbolPoint = Point(upItem.origin[0], upItem.origin[1]) |
|
1020 |
if symbolPoint.distance(Point(attribute_table_item[1][0].center().x(), attribute_table_item[1][0].center().y())) < \ |
|
1021 |
symbolPoint.distance(Point(attribute_table_item[1][1].center().x(), attribute_table_item[1][1].center().y())): |
|
1022 |
upText = attribute_table_item[1][0] |
|
1023 |
downText = attribute_table_item[1][1] |
|
1021 | 1024 |
else: |
1022 |
pass |
|
1025 |
upText = attribute_table_item[1][1] |
|
1026 |
downText = attribute_table_item[1][0] |
|
1027 |
elif issubclass(type(downItem), SymbolSvgItem): |
|
1028 |
symbolPoint = Point(downItem.origin[0], downItem.origin[1]) |
|
1029 |
if symbolPoint.distance(Point(attribute_table_item[1][0].center().x(), attribute_table_item[1][0].center().y())) < \ |
|
1030 |
symbolPoint.distance(Point(attribute_table_item[1][1].center().x(), attribute_table_item[1][1].center().y())): |
|
1031 |
downText = attribute_table_item[1][0] |
|
1032 |
upText = attribute_table_item[1][1] |
|
1033 |
else: |
|
1034 |
downText = attribute_table_item[1][1] |
|
1035 |
upText = attribute_table_item[1][0] |
|
1036 |
else: |
|
1037 |
if upItem.length() < downItem.length(): |
|
1038 |
linePoint = Point(upItem.center().x(), upItem.center().y()) |
|
1039 |
if linePoint.distance(Point(attribute_table_item[1][0].center().x(), attribute_table_item[1][0].center().y())) < \ |
|
1040 |
linePoint.distance(Point(attribute_table_item[1][1].center().x(), attribute_table_item[1][1].center().y())): |
|
1041 |
upText = attribute_table_item[1][0] |
|
1042 |
downText = attribute_table_item[1][1] |
|
1043 |
else: |
|
1044 |
upText = attribute_table_item[1][1] |
|
1045 |
downText = attribute_table_item[1][0] |
|
1046 |
else: |
|
1047 |
linePoint = Point(downItem.center().x(), downItem.center().y()) |
|
1048 |
if linePoint.distance(Point(attribute_table_item[1][0].center().x(), attribute_table_item[1][0].center().y())) < \ |
|
1049 |
linePoint.distance(Point(attribute_table_item[1][1].center().x(), attribute_table_item[1][1].center().y())): |
|
1050 |
downText = attribute_table_item[1][0] |
|
1051 |
upText = attribute_table_item[1][1] |
|
1052 |
else: |
|
1053 |
downText = attribute_table_item[1][1] |
|
1054 |
upText = attribute_table_item[1][0] |
|
1055 |
|
|
1056 |
if upText and downText: |
|
1057 |
for full in specBreakAttrsFull: |
|
1058 |
if full.Attribute == attribute_table_item[0]: |
|
1059 |
attrs[full] = [upText.text(), downText.text()] |
|
1060 |
attribute_table_item[1].remove(upText) |
|
1061 |
attribute_table_item[1].remove(downText) |
|
1062 |
break |
|
1023 | 1063 |
|
1024 | 1064 |
# up to here |
1025 | 1065 |
|
내보내기 Unified diff