Fix IFC export elevation with wrong unit

This commit is contained in:
hoshengwei
2024-10-26 01:38:47 +08:00
committed by Yorik van Havre
parent d6660f88ed
commit 96d0bcbc04

View File

@@ -1766,7 +1766,7 @@ def exportIfcAttributes(obj, kwargs, scale=0.001):
value = obj.getPropertyByName(property)
if isinstance(value, FreeCAD.Units.Quantity):
value = float(value)
if property in ["ElevationWithFlooring","Elevation"]:
if "Elevation" in property:
value = value*scale # some properties must be changed to meters
if (ifctype == "IfcFurnishingElement") and (property == "PredefinedType"):
pass # IFC2x3 Furniture objects get converted to IfcFurnishingElement and have no PredefinedType anymore