Calculates the X length of the geometry :param geometry: Geometry output calculated by IfcOpenShell :return: The X dimension
(geometry: W.Triangulation)
| 99 | |
| 100 | |
| 101 | def get_x(geometry: W.Triangulation) -> float: |
| 102 | """Calculates the X length of the geometry |
| 103 | |
| 104 | :param geometry: Geometry output calculated by IfcOpenShell |
| 105 | :return: The X dimension |
| 106 | """ |
| 107 | verts_flat = get_vertices(geometry).ravel() |
| 108 | return (np.max(verts_flat[0::3]) - np.min(verts_flat[0::3])).item() |
| 109 | |
| 110 | |
| 111 | def get_y(geometry: W.Triangulation) -> float: |
no test coverage detected