From 58b62853c1a1adb8c13b478b0e3fc4decc2a4baa Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Wed, 9 Oct 2019 08:10:09 +0200 Subject: [PATCH] Arch: IFC import, better import of small assemblies for nonparametric arch and part shape mode --- src/Mod/Arch/importIFC.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index fd7b7b5aee..bf224e9820 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -668,6 +668,10 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): a = obj.IfcData a["IfcUID"] = str(guid) obj.IfcData = a + elif pid in additions: + # no baseobj but in additions, thus we make a BuildingPart container + obj = getattr(Arch,"makeBuildingPart")(name=name) + if preferences['DEBUG']: print(": "+obj.Label+" ",end="") else: if preferences['DEBUG']: print(": skipped.") continue @@ -687,6 +691,10 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): elif baseobj: obj = FreeCAD.ActiveDocument.addObject("Part::Feature",name) obj.Shape = shape + elif pid in additions: + # no baseobj but in additions, thus we make a BuildingPart container + obj = getattr(Arch,"makeBuildingPart")(name=name) + if preferences['DEBUG']: print(": "+obj.Label+" ",end="") else: if preferences['DEBUG']: print(": skipped.") continue @@ -955,6 +963,8 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): for host,children in additions.items(): if host not in objects.keys(): + # print(host, 'not used') + # print(ifcfile[host]) continue cobs = [] for child in children: