From 832dce462e5a656be5f704db1363e1b1c9d2a4cc Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 26 Jun 2024 16:47:21 +0500 Subject: [PATCH] spatial manager - fix bug with elevation not converted to si Leading to issues if you would change it in non-meters project. --- src/blenderbim/blenderbim/tool/spatial.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/tool/spatial.py b/src/blenderbim/blenderbim/tool/spatial.py index 0e27e35793..9ad2994dcf 100644 --- a/src/blenderbim/blenderbim/tool/spatial.py +++ b/src/blenderbim/blenderbim/tool/spatial.py @@ -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)