Skip to content

Commit

Permalink
Arch: IFC import, better import of small assemblies for nonparametric…
Browse files Browse the repository at this point in the history
… arch and part shape mode
  • Loading branch information
berndhahnebach committed Oct 9, 2019
1 parent 3bc85bc commit 8d9e0c2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Mod/Arch/importIFC.py
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8d9e0c2

Please sign in to comment.