From 46a1d1d254cbec3f2e75e01bb99b3b816fcd2c59 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 14 Aug 2019 17:56:15 -0300 Subject: [PATCH] Arch: Minor fixes to IFC export --- src/Mod/Arch/ArchStructure.py | 2 +- src/Mod/Arch/exportIFCHelper.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index 722ddedccd..051993977f 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -118,7 +118,7 @@ def makeStructure(baseobj=None,length=None,width=None,height=None,name="Structur obj.Length = h if not height and not length: - obj.IfcType = "Building Element Proxy" + obj.IfcType = "Undefined" elif obj.Length > obj.Height: obj.IfcType = "Beam" obj.Label = translate("Arch","Beam") diff --git a/src/Mod/Arch/exportIFCHelper.py b/src/Mod/Arch/exportIFCHelper.py index 65dc6a3a5f..8f52783be7 100644 --- a/src/Mod/Arch/exportIFCHelper.py +++ b/src/Mod/Arch/exportIFCHelper.py @@ -3,8 +3,9 @@ import FreeCAD, Draft, json, ifcopenshell, math def getObjectsOfIfcType(objects, ifcType): results = [] for object in objects: - if object.IfcType == ifcType: - results.append(object) + if hasattr(object,"IfcType"): + if object.IfcType == ifcType: + results.append(object) return results class SIUnitCreator: