More consistent PlanLevel and SectionLevel in viewport and svg

Now it's using first vert instead of last to calculate height (same way svgwriter does it)
This commit is contained in:
Andrej730
2023-05-17 14:50:36 +05:00
parent 18b6969221
commit 0365c6d43b
@@ -1089,7 +1089,7 @@ class PlanLevelDecorator(BaseDecorator):
box_alignment = "bottom-right"
dir *= -1
z = verts[-1].z / unit_scale
z = verts[0].z / unit_scale
z = ifcopenshell.util.geolocation.auto_z2e(tool.Ifc.get(), z)
z *= unit_scale
text = "RL " + self.format_value(context, z)
@@ -1147,7 +1147,7 @@ class SectionLevelDecorator(BaseDecorator):
tag = storey.Name if storey else element.Description
for verts in splines:
z = verts[-1].z / unit_scale
z = verts[0].z / unit_scale
z = ifcopenshell.util.geolocation.auto_z2e(tool.Ifc.get(), z)
z *= unit_scale