Draft: Add support for App::Part in Draft Clones

This commit is contained in:
Yorik van Havre
2017-09-20 11:12:11 -03:00
parent 01f7894b2b
commit 5e4b64d99f

View File

@@ -5793,10 +5793,19 @@ class _Clone(_DraftObject):
return
objs = getGroupContents(obj.Objects)
for o in objs:
sh = None
if o.isDerivedFrom("Part::Feature"):
if o.Shape.isNull():
return
sh = o.Shape.copy()
if not o.Shape.isNull():
sh = o.Shape.copy()
elif o.isDerivedFrom("App::Part"):
shps = []
for so in o.Group:
if so.isDerivedFrom("Part::Feature"):
if not so.Shape.isNull():
shps.append(so.Shape)
if shps:
sh = Part.makeCompound(shps)
if sh:
m = FreeCAD.Matrix()
if hasattr(obj,"Scale") and not sh.isNull():
sx,sy,sz = obj.Scale