From 855fa1adc60d9f7a5a35d17ba9b6f1d22a637d6a Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Tue, 14 Apr 2020 16:51:54 +0200 Subject: [PATCH] Arch: Support App::Parts in IFC export --- src/Mod/Arch/exportIFC.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/Mod/Arch/exportIFC.py b/src/Mod/Arch/exportIFC.py index 8baf610739..699d6a516b 100644 --- a/src/Mod/Arch/exportIFC.py +++ b/src/Mod/Arch/exportIFC.py @@ -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"]: