Arch: Support App::Parts in IFC export

This commit is contained in:
Yorik van Havre
2020-04-14 16:51:54 +02:00
parent 0ea99fd22e
commit 00b0458e1d

View File

@@ -329,6 +329,32 @@ def export(exportList,filename,colors=None,preferences=None):
assemblyElements.append(subproduct)
ifctype = "IfcElementAssembly"
elif ifctype == "IfcApp::Part":
for subobj in [FreeCAD.ActiveDocument.getObject(n[:-1]) for n in obj.getSubObjects()]:
representation,placement,shapetype = getRepresentation(
ifcfile,
context,
subobj,
forcebrep=(getBrepFlag(subobj,preferences)),
colors=colors,
preferences=preferences
)
subproduct = createProduct(
ifcfile,
subobj,
getIfcTypeFromObj(subobj),
getUID(subobj,preferences),
history,
getText("Name",subobj),
getText("Description",subobj),
placement,
representation,
preferences,
schema)
assemblyElements.append(subproduct)
ifctype = "IfcElementAssembly"
# export grids
if ifctype in ["IfcAxis","IfcAxisSystem","IfcGrid"]: