From c9423e99862454a628057447c370eee6889e5e85 Mon Sep 17 00:00:00 2001 From: shai Date: Mon, 9 Dec 2024 15:07:28 +0200 Subject: [PATCH] BaseBend compatibility with FreeCad linkstage. Issue #422 --- SheetMetalTools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SheetMetalTools.py b/SheetMetalTools.py index a4d8ca9..f20ead8 100644 --- a/SheetMetalTools.py +++ b/SheetMetalTools.py @@ -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::")