Draft: Small fix to wire object

This commit is contained in:
Yorik van Havre 2012-06-15 18:20:52 -03:00
parent 222def8764
commit 9ae96083d3

View File

@ -2416,16 +2416,17 @@ class _Wire:
for v in shape.Vertexes: p.append(v.Point) for v in shape.Vertexes: p.append(v.Point)
if fp.Points != p: fp.Points = p if fp.Points != p: fp.Points = p
elif fp.Base and fp.Tool: elif fp.Base and fp.Tool:
if ('Shape' in fp.Base.PropertiesList) and ('Shape' in fp.Tool.PropertiesList): if fp.Base.isDerivedFrom("Part::Feature") and fp.Tool.isDerivedFrom("Part::Feature"):
sh1 = fp.Base.Shape.copy() if (not fp.Base.Shape.isNull()) and (not fp.Tool.Shape.isNull()):
sh2 = fp.Tool.Shape.copy() sh1 = fp.Base.Shape.copy()
shape = sh1.fuse(sh2) sh2 = fp.Tool.Shape.copy()
if DraftGeomUtils.isCoplanar(shape.Faces): shape = sh1.fuse(sh2)
shape = DraftGeomUtils.concatenate(shape) if DraftGeomUtils.isCoplanar(shape.Faces):
fp.Shape = shape shape = DraftGeomUtils.concatenate(shape)
p = [] fp.Shape = shape
for v in shape.Vertexes: p.append(v.Point) p = []
if fp.Points != p: fp.Points = p for v in shape.Vertexes: p.append(v.Point)
if fp.Points != p: fp.Points = p
elif fp.Points: elif fp.Points:
if fp.Points[0] == fp.Points[-1]: if fp.Points[0] == fp.Points[-1]:
if not fp.Closed: fp.Closed = True if not fp.Closed: fp.Closed = True