Skip to content

Commit

Permalink
Draft: used distToShape in DraftGeomUtils - fixes 1439
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Feb 24, 2014
1 parent 7b92e8f commit bab0c36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Mod/Draft/DraftGeomUtils.py
Expand Up @@ -282,6 +282,14 @@ def getLineIntersections(pt1,pt2,pt3,pt4,infinite1,infinite2):
else :
return [] # Lines aren't on same plane

# First, try to use distToShape if possible
if isinstance(edge1,Part.Edge) and isinstance(edge2,Part.Edge) and (not infinite1) and (not infinite2):
dist, pts, geom = edge1.distToShape(edge2)
sol = []
for p in pts:
sol.append(p[0])
return sol

pt1 = None

if isinstance(edge1,FreeCAD.Vector) and isinstance(edge2,FreeCAD.Vector):
Expand Down

0 comments on commit bab0c36

Please sign in to comment.