Arch: Minor fixes to IFC export

This commit is contained in:
Yorik van Havre
2019-08-14 17:56:15 -03:00
parent 36d418349e
commit 46a1d1d254
2 changed files with 4 additions and 3 deletions

View File

@@ -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")

View File

@@ -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: