Fix the wrong length calculation for beams and columns
This commit is contained in:
Massimo Fabbro
2025-03-10 10:04:58 +01:00
committed by Dion Moult
parent 1259607a9f
commit 4260313a99
@@ -63,12 +63,12 @@ def get_linear_length(o: bpy.types.Object) -> float:
return max(x, y, z) return max(x, y, z)
def get_length(o: bpy.types.Object, vg_index: Optional[int] = None, main_axis: str = "x") -> float: def get_length(o: bpy.types.Object, vg_index: Optional[int] = None) -> float:
if vg_index is None: if vg_index is None:
x = get_x(o) x = get_x(o)
y = get_y(o) y = get_y(o)
z = get_z(o) z = get_z(o)
if get_object_main_axis(o) == "x" or main_axis == "x": if get_object_main_axis(o) == "x":
return max(x, y) return max(x, y)
if get_object_main_axis(o) == "z": if get_object_main_axis(o) == "z":
return max(z, x) return max(z, x)