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
This commit is contained in:
Bernd Hahnebach
2017-10-19 07:23:07 +01:00
committed by wmayer
parent 3624cbd204
commit 9cef7207f8

View File

@@ -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