Skip to content

Commit

Permalink
fix intersection again
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Feb 5, 2014
1 parent 5746a52 commit 96a6dbc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CadEventFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,11 @@ def _constrain(self, point):
p1, p2 = CadIntersection.CircleLineIntersection(self.snapSegment[1], self.snapSegment[2],
previousPoint, self.inputwidget.d)
#we snap to the nearest intersection
if point.sqrDist(p1) < point.sqrDist(p2):
point.set( p1.x(), p1.y() )
else:
point.set( p2.x(), p2.y() )
if p1 is not None:
if point.sqrDist(p1) < point.sqrDist(p2):
point.set( p1.x(), p1.y() )
else:
point.set( p2.x(), p2.y() )
else:
self.inputwidget.d = dist

Expand Down

0 comments on commit 96a6dbc

Please sign in to comment.