Skip to content

Commit

Permalink
Arch: IFC import, better debug message for skipped objs in non parame…
Browse files Browse the repository at this point in the history
…tric import mode
  • Loading branch information
berndhahnebach committed Oct 7, 2019
1 parent 617e8b5 commit 91ae525
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Mod/Arch/importIFC.py
Expand Up @@ -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
Expand All @@ -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):

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

Expand Down

0 comments on commit 91ae525

Please sign in to comment.