mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 21:53:40 +00:00
aligned grid labels horizontally
This commit is contained in:
@@ -1020,9 +1020,7 @@ class GridDecorator(BaseDecorator):
|
|||||||
v1 = Vector(vertices[1])
|
v1 = Vector(vertices[1])
|
||||||
p0 = location_3d_to_region_2d(region, region3d, v0)
|
p0 = location_3d_to_region_2d(region, region3d, v0)
|
||||||
p1 = location_3d_to_region_2d(region, region3d, v1)
|
p1 = location_3d_to_region_2d(region, region3d, v1)
|
||||||
dir = p1 - p0
|
dir = Vector((1, 0))
|
||||||
if dir.length < 1:
|
|
||||||
return
|
|
||||||
text = obj.BIMObjectProperties.attributes['AxisTag'].string_value
|
text = obj.BIMObjectProperties.attributes['AxisTag'].string_value
|
||||||
self.draw_label(text, p0, dir, vcenter=True, gap=0)
|
self.draw_label(text, p0, dir, vcenter=True, gap=0)
|
||||||
self.draw_label(text, p1, dir, vcenter=True, gap=0)
|
self.draw_label(text, p1, dir, vcenter=True, gap=0)
|
||||||
|
|||||||
Reference in New Issue
Block a user