From 891fa6e52cac51caeb33ff79d374716f11e27646 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Thu, 19 Oct 2017 07:23:07 +0100 Subject: [PATCH] Arch, import ifc, print debug for each obj in a new line - use ,end='' for any print without continue in the next code line - add a print('') at the end of the product loop --- src/Mod/Arch/importIFC.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 359785d5b7..9c76072b3e 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -586,7 +586,7 @@ def insert(filename,docname,skip=[],only=[],root=None): if not shape.isNull(): if (MERGE_MODE_ARCH > 0 and archobj) or structobj: if ptype == "IfcSpace": # do not add spaces to compounds - if DEBUG: print("skipping space ",pid) + if DEBUG: print("skipping space ",pid,end="") elif structobj: structshapes[pid] = shape if DEBUG: print(shape.Solids," ",end="") @@ -631,7 +631,7 @@ def insert(filename,docname,skip=[],only=[],root=None): #continue else: - if DEBUG: print(" no brep ") + if DEBUG: print(" no brep ",end="") if MERGE_MODE_ARCH == 0 and archobj: @@ -694,7 +694,7 @@ def insert(filename,docname,skip=[],only=[],root=None): obj = Arch.makeComponent(baseobj,name=name) if obj: sols = str(obj.Shape.Solids) if hasattr(obj,"Shape") else "" - if DEBUG: print(sols) + if DEBUG: print(sols,end="") objects[pid] = obj elif (MERGE_MODE_ARCH == 1 and archobj) or (MERGE_MODE_STRUCT == 0 and not archobj): @@ -718,6 +718,8 @@ def insert(filename,docname,skip=[],only=[],root=None): obj = FreeCAD.ActiveDocument.addObject("Part::Feature",name) obj.Shape = shape + if DEBUG: print("") # newline for debug prints, print for a new object should be on a new line + if obj: obj.Label = name