mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 21:58:46 +00:00
Convenience function for calculators to get maximum XY length
This is useful for 2D profiles
This commit is contained in:
@@ -117,6 +117,17 @@ def get_z(geometry) -> float:
|
|||||||
return max(z_values) - min(z_values)
|
return max(z_values) - min(z_values)
|
||||||
|
|
||||||
|
|
||||||
|
def get_max_xy(geometry) -> float:
|
||||||
|
"""Gets the maximum X or Y length of the geometry
|
||||||
|
|
||||||
|
:param geometry: Geometry output calculated by IfcOpenShell
|
||||||
|
:type geometry: geometry
|
||||||
|
:return: The maximum possible value out of the X and Y dimension
|
||||||
|
:rtype: float
|
||||||
|
"""
|
||||||
|
return max(get_x(geometry), get_y(geometry))
|
||||||
|
|
||||||
|
|
||||||
def get_max_xyz(geometry) -> float:
|
def get_max_xyz(geometry) -> float:
|
||||||
"""Gets the maximum X, Y, or Z length of the geometry
|
"""Gets the maximum X, Y, or Z length of the geometry
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user