Arch: fixed placement of Space label on TD pages

This commit is contained in:
Yorik van Havre
2020-10-26 10:35:40 +01:00
parent 00a1aa6225
commit 0b609773fe

View File

@@ -789,8 +789,12 @@ def get_svg(obj,
scale = vobj.FirstLine.Value/vobj.FontSize.Value
f1 = fontsize * scale
_v = vobj.Proxy.coords.translation.getValue().getValue()
p2 = obj.Placement.multVec(App.Vector(_v))
if round(plane.axis.getAngle(App.Vector(0,0,1)),2) not in [0,3.14]:
# if not in XY view, place the label at center
p2 = obj.Shape.CenterOfMass
else:
_v = vobj.Proxy.coords.translation.getValue().getValue()
p2 = obj.Placement.multVec(App.Vector(_v))
_h = vobj.Proxy.header.translation.getValue().getValue()
lspc = App.Vector(_h)