Draft: support object without shape in DraftLink
This commit is contained in:
committed by
Yorik van Havre
parent
4234e66796
commit
4d3ea2d850
@@ -177,8 +177,10 @@ class DraftLink(DraftObject):
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user