spatial manager - fix bug with elevation not converted to si

Leading to issues if you would change it in non-meters project.
This commit is contained in:
Andrej730
2024-06-26 16:47:21 +05:00
parent 6f45373edd
commit 832dce462e
+3 -1
View File
@@ -279,7 +279,9 @@ class Spatial(blenderbim.core.tool.Spatial):
new.description = element.Description or ""
new.long_name = element.LongName or ""
if not element.is_a("IfcProject"):
new.elevation = ifcopenshell.util.placement.get_storey_elevation(element)
ifc_file = tool.Ifc.get()
si_conversion = ifcopenshell.util.unit.calculate_unit_scale(ifc_file)
new.elevation = ifcopenshell.util.placement.get_storey_elevation(element) * si_conversion
new.is_expanded = element.id() not in cls.contracted_containers
new.level_index = level_index
children = ifcopenshell.util.element.get_parts(element)