diff --git a/src/Mod/Draft/DraftGeomUtils.py b/src/Mod/Draft/DraftGeomUtils.py index fa05fc2e320c..f2553c1c5e0a 100755 --- a/src/Mod/Draft/DraftGeomUtils.py +++ b/src/Mod/Draft/DraftGeomUtils.py @@ -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):