Skip to content

Commit

Permalink
BaseBend compatibility with FreeCad linkstage. Issue #422
Browse files Browse the repository at this point in the history
  • Loading branch information
shaise committed Dec 9, 2024
1 parent 6021a6f commit c9423e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SheetMetalTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ def smIsSketchObject(obj):

def smIsPartDesign(obj):
if smIsSketchObject(obj):
if hasattr(obj, "getParents"): # FreeCAD Linkstage compatibility
if len(obj.getParents()) == 0:
return False
return isinstance(obj.getParents()[0][0], Part.BodyBase)
return isinstance(obj.getParent(), Part.BodyBase)
return obj.TypeId.startswith("PartDesign::")

Expand Down

0 comments on commit c9423e9

Please sign in to comment.