MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / get_y

Function get_y

src/ifcopenshell-python/ifcopenshell/util/shape.py:111–118  ·  view source on GitHub ↗

Calculates the Y length of the geometry :param geometry: Geometry output calculated by IfcOpenShell :return: The Y dimension

(geometry: W.Triangulation)

Source from the content-addressed store, hash-verified

109
110
111def get_y(geometry: W.Triangulation) -> float:
112 """Calculates the Y length of the geometry
113
114 :param geometry: Geometry output calculated by IfcOpenShell
115 :return: The Y dimension
116 """
117 verts_flat = get_vertices(geometry).ravel()
118 return (np.max(verts_flat[1::3]) - np.min(verts_flat[1::3])).item()
119
120
121def get_z(geometry: W.Triangulation) -> float:

Callers 3

get_max_xyFunction · 0.70
get_max_xyzFunction · 0.70
get_min_xyzFunction · 0.70

Calls 2

get_verticesFunction · 0.85
itemMethod · 0.80

Tested by

no test coverage detected