mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
PLAN/SECTION_LEVEL consistency between viewport and svg
before - https://i.imgur.com/bwYbozz.png after - https://i.imgur.com/7BlmQIg.png NOTE that if you're using markers.svg that was created before this update you won't see the changes for the section-/plan-level markers.
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
<marker id="stair-marker-end" markerHeight="42" markerWidth="21" orient="auto" refX="21" refY="21">
|
||||
<path d="M 0 0 L 21 21 L 0 42" class="annotation stair" style="stroke-width:2; marker-start: none; marker-end: none;" />
|
||||
</marker>
|
||||
<marker id="plan-level-marker" markerHeight="30" markerWidth="30" refX="15" refY="15">
|
||||
<marker id="plan-level-marker" markerHeight="30" markerWidth="30" refX="15" refY="15" orient="auto">
|
||||
<g>
|
||||
<path d="M 15 0 L 15 30" class="annotation" style="stroke-width:1;" />
|
||||
<path d="M 0 15 L 30 15" class="annotation" style="stroke-width:1;" />
|
||||
@@ -84,7 +84,7 @@
|
||||
<path d="M 15 15 L 22.5 15 A 7.5 7.5 0 0 1 15 22.5 Z" fill="black"/>
|
||||
</g>
|
||||
</marker>
|
||||
<marker id="section-level-marker" markerHeight="11" markerWidth="90" refX="20" refY="10">
|
||||
<marker id="section-level-marker" markerHeight="11" markerWidth="90" refX="20" refY="10" orient="auto-start-reverse">
|
||||
<g>
|
||||
<path d="M 0 1 L 20 1 L 10 11 Z" fill="black" />
|
||||
<path d="M 0 1 L 90 1" class="annotation" style="stroke-width:1;" />
|
||||
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -242,6 +242,8 @@ class SvgWriter:
|
||||
d = "M{}".format(d[1:])
|
||||
path = self.svg.add(self.svg.path(d=d, class_=" ".join(classes)))
|
||||
text_position = projected_points_svg[0] - Vector((0, base_offset_y))
|
||||
vector = projected_points_svg[0] - projected_points_svg[1]
|
||||
angle = math.degrees(vector.angle_signed(Vector((1, 0))))
|
||||
|
||||
# TODO: allow metric to be configurable
|
||||
rl_value = (matrix_world @ points[0].co.xyz).z
|
||||
@@ -269,6 +271,7 @@ class SvgWriter:
|
||||
text_tags += self.create_text_tag(
|
||||
text,
|
||||
text_position,
|
||||
angle=angle,
|
||||
class_str="SECTIONLEVEL",
|
||||
line_number_start=line_number_start,
|
||||
fill_bg=fill_bg
|
||||
@@ -898,6 +901,8 @@ class SvgWriter:
|
||||
d = "M{}".format(d[1:])
|
||||
path = self.svg.add(self.svg.path(d=d, class_=" ".join(classes)))
|
||||
text_position = projected_points_svg[0] - Vector((0, base_offset_y))
|
||||
vector = projected_points_svg[1] - projected_points_svg[0]
|
||||
angle = math.degrees(vector.angle_signed(Vector((1, 0))))
|
||||
|
||||
# TODO: allow metric to be configurable
|
||||
rl_value = (matrix_world @ points[0].co).z
|
||||
@@ -927,6 +932,7 @@ class SvgWriter:
|
||||
text_tags += self.create_text_tag(
|
||||
text,
|
||||
text_position,
|
||||
angle=angle,
|
||||
class_str="PLANLEVEL",
|
||||
line_number_start=line_number_start,
|
||||
box_alignment=box_alignment,
|
||||
@@ -1325,7 +1331,7 @@ class SvgWriter:
|
||||
self,
|
||||
text,
|
||||
text_position,
|
||||
angle=0,
|
||||
angle=0.0,
|
||||
box_alignment="bottom-left",
|
||||
class_str="",
|
||||
text_format=lambda x: x,
|
||||
|
||||
Reference in New Issue
Block a user