From 91ae52577b59954668958f57ee4ec19e33b2d278 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Mon, 7 Oct 2019 21:48:01 +0200 Subject: [PATCH] Arch: IFC import, better debug message for skipped objs in non parametric import mode --- src/Mod/Arch/importIFC.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 72254f807b..fd7b7b5aee 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -648,6 +648,7 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): for freecadtype,ifctypes in typesmap.items(): if ptype in ifctypes: obj = getattr(Arch,"make"+freecadtype)(baseobj=baseobj,name=name) + if preferences['DEBUG']: print(": "+obj.Label+" ",end="") if ptype == "IfcBuildingStorey": if product.Elevation: obj.Placement.Base.z = product.Elevation * ifcscale @@ -667,6 +668,9 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): a = obj.IfcData a["IfcUID"] = str(guid) obj.IfcData = a + else: + if preferences['DEBUG']: print(": skipped.") + continue elif (preferences['MERGE_MODE_ARCH'] == 2 and archobj) or (preferences['MERGE_MODE_STRUCT'] == 1 and not archobj): @@ -676,12 +680,16 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): for freecadtype,ifctypes in typesmap.items(): if ptype in ifctypes: obj = getattr(Arch,"make"+freecadtype)(baseobj=baseobj,name=name) + if preferences['DEBUG']: print(": "+obj.Label+" ",end="") if ptype == "IfcBuildingStorey": if product.Elevation: obj.Placement.Base.z = product.Elevation * ifcscale elif baseobj: obj = FreeCAD.ActiveDocument.addObject("Part::Feature",name) obj.Shape = shape + else: + if preferences['DEBUG']: print(": skipped.") + continue if preferences['DEBUG']: print("") # newline for debug prints, print for a new object should be on a new line