Convenience function for calculators to get maximum XY length

This is useful for 2D profiles
This commit is contained in:
Dion Moult
2024-06-01 15:11:29 +10:00
parent 6e30cd2ba7
commit e26dae67aa
@@ -117,6 +117,17 @@ def get_z(geometry) -> float:
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:
"""Gets the maximum X, Y, or Z length of the geometry