mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00: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)
|
||||||
|
|||||||
Reference in New Issue
Block a user