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

Function get_z

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

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

(geometry: W.Triangulation)

Source from the content-addressed store, hash-verified

119
120
121def get_z(geometry: W.Triangulation) -> float:
122 """Calculates the Z length of the geometry
123
124 :param geometry: Geometry output calculated by IfcOpenShell
125 :return: The Z dimension
126 """
127 verts_flat = get_vertices(geometry).ravel()
128 return (np.max(verts_flat[2::3]) - np.min(verts_flat[2::3])).item()
129
130
131def get_max_xy(geometry: W.Triangulation) -> float:

Callers 2

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