Draft: Small fix in trimex

This commit is contained in:
Yorik van Havre
2014-03-03 17:32:48 -03:00
parent 2fb5d5869b
commit 320e40d30d

View File

@@ -2770,12 +2770,13 @@ class Trimex(Modifier):
# snapping
if snapped:
snapped = self.doc.getObject(snapped['Object'])
pts = []
for e in snapped.Shape.Edges:
int = DraftGeomUtils.findIntersection(edge,e,True,True)
if int: pts.extend(int)
if pts:
point = pts[DraftGeomUtils.findClosest(point,pts)]
if hasattr(snapped,"Shape"):
pts = []
for e in snapped.Shape.Edges:
int = DraftGeomUtils.findIntersection(edge,e,True,True)
if int: pts.extend(int)
if pts:
point = pts[DraftGeomUtils.findClosest(point,pts)]
# modifying active edge
if DraftGeomUtils.geomType(edge) == "Line":