Skip to content

Commit

Permalink
Draft: support object without shape in DraftLink
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder authored and yorikvanhavre committed Oct 19, 2020
1 parent 4234e66 commit 4d3ea2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Draft/draftobjects/draftlink.py
Expand Up @@ -177,8 +177,10 @@ def buildShape(self, obj, pl, pls):
obj.Count = len(pls)

if obj.Base:
shape = Part.getShape(obj.Base)
if shape.isNull():
shape = getattr(obj.Base, 'Shape', None)
if not isinstance(shape, Part.Shape):
obj.Shape = Part.Shape()
elif shape.isNull():
_err_msg = ("'{}' cannot build shape "
"from '{}'\n".format(obj.Label, obj.Base.Label))
raise RuntimeError(_err_msg)
Expand Down

0 comments on commit 4d3ea2d

Please sign in to comment.