mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
whoops
This commit is contained in:
@@ -997,7 +997,7 @@ class FallDecorator(BaseDecorator):
|
|||||||
# generate label text
|
# generate label text
|
||||||
# same function as in svgwriter.py
|
# same function as in svgwriter.py
|
||||||
def get_label_text():
|
def get_label_text():
|
||||||
B, A = [obj.matrix_world @ v.co.xyz for v in spline_points[:2]]
|
B, A = [v.co.xyz for v in spline_points[:2]]
|
||||||
rise = abs(A.z - B.z)
|
rise = abs(A.z - B.z)
|
||||||
O = A.copy()
|
O = A.copy()
|
||||||
O.z = B.z
|
O.z = B.z
|
||||||
@@ -1009,14 +1009,13 @@ class FallDecorator(BaseDecorator):
|
|||||||
angle = 90
|
angle = 90
|
||||||
|
|
||||||
# uses SLOPE_ANGLE as default
|
# uses SLOPE_ANGLE as default
|
||||||
object_type = DecoratorData.data["fall"].get(obj.name, {}).get("object_type", None)
|
object_type = DecoratorData.data["fall"].get(obj, {}).get("object_type", None)
|
||||||
if object_type in ("FALL", "SLOPE_ANGLE"):
|
if object_type in ("FALL", "SLOPE_ANGLE"):
|
||||||
return f"{angle}°"
|
return f"{angle}°"
|
||||||
elif object_type == "SLOPE_FRACTION":
|
elif object_type == "SLOPE_FRACTION":
|
||||||
if angle == 90:
|
if angle == 90:
|
||||||
return "-"
|
return "-"
|
||||||
segment_length = (B - A).length
|
return f"{self.format_value(context, rise)} / {self.format_value(context, run)}"
|
||||||
return f"{self.format_value(context, rise)} / {self.format_value(context, segment_length)}"
|
|
||||||
elif object_type == "SLOPE_PERCENT":
|
elif object_type == "SLOPE_PERCENT":
|
||||||
if angle == 90:
|
if angle == 90:
|
||||||
return "-"
|
return "-"
|
||||||
|
|||||||
@@ -1446,7 +1446,7 @@ class SvgWriter:
|
|||||||
# generate label text
|
# generate label text
|
||||||
# same function as in decoration.py
|
# same function as in decoration.py
|
||||||
def get_label_text():
|
def get_label_text():
|
||||||
B, A = [matrix_world @ v.co.xyz for v in points[:2]]
|
B, A = [v.co.xyz for v in points[:2]]
|
||||||
rise = abs(A.z - B.z)
|
rise = abs(A.z - B.z)
|
||||||
O = A.copy()
|
O = A.copy()
|
||||||
O.z = B.z
|
O.z = B.z
|
||||||
|
|||||||
Reference in New Issue
Block a user