Get all the faces as a numpy array Faces are always triangulated. If the shape is a BRep and you want to get the original untriangulated output, refer to :func:`get_edges`. Results are a nested numpy array e.g. [[f1v1, f1v2, f1v3], [f2v1, f2v2, f2v3], ...] :param geometry: Geometr
(geometry: W.Triangulation)
| 252 | |
| 253 | |
| 254 | def get_faces(geometry: W.Triangulation) -> npt.NDArray[np.int32]: |
| 255 | """Get all the faces as a numpy array |
| 256 | |
| 257 | Faces are always triangulated. If the shape is a BRep and you want to get |
| 258 | the original untriangulated output, refer to :func:`get_edges`. |
| 259 | |
| 260 | Results are a nested numpy array e.g. [[f1v1, f1v2, f1v3], [f2v1, f2v2, f2v3], ...] |
| 261 | |
| 262 | :param geometry: Geometry output calculated by IfcOpenShell |
| 263 | :return: A numpy array listing all the faces. |
| 264 | Array shape: (n, 3), where n - number of faces. |
| 265 | """ |
| 266 | return np.frombuffer(geometry.faces_buffer, dtype="i").reshape(-1, 3) |
| 267 | |
| 268 | |
| 269 | def get_material_colors(geometry: W.Triangulation) -> npt.NDArray[np.float64]: |
no outgoing calls
no test coverage detected