개정판 5a049576
fic auto connection
Change-Id: I53d22d04503811d1c62b555cc7c8cad99df3271b
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py | ||
---|---|---|
745 | 745 |
elif type(obj) is QEngineeringLineItem: |
746 | 746 |
_startPt = obj.start_point() |
747 | 747 |
_endPt = obj.end_point() |
748 |
|
|
748 | 749 |
# avoid zero length line, can be losted short line |
749 |
if Point(_startPt[0], _startPt[1]).distance(Point(_endPt[0], _endPt[1])) < toler or \ |
|
750 |
Point(start_pt[0], start_pt[1]).distance(Point(end_pt[0], end_pt[1])) < toler: |
|
751 |
return res |
|
750 |
#if Point(_startPt[0], _startPt[1]).distance(Point(_endPt[0], _endPt[1])) < toler or \ |
|
751 |
# Point(start_pt[0], start_pt[1]).distance(Point(end_pt[0], end_pt[1])) < toler: |
|
752 |
# return res |
|
753 |
|
|
752 | 754 |
if obj.connectors[0].connectedItem is None and self.distanceTo(_startPt) < toler: |
753 | 755 |
if self.connectors[0].connectedItem is None and \ |
754 | 756 |
(Point(start_pt[0], start_pt[1]).distance(Point(_startPt[0], _startPt[1])) < toler): |
내보내기 Unified diff