pyblenderSDIC.meshes.TriangleMesh3D.compute_bounding_box#
- TriangleMesh3D.compute_bounding_box() None [source]#
Compute the bounding box of the mesh.
The bounding box is computed as the minimum and maximum coordinates of the vertices in each dimension. The result is stored in the
bounding_box
attribute as a NumPy array of shape (2, 3).The axis of the bounding box are ordered along the X, Y, Z dimensions.
from pyblenderSDIC.mesh import TriangleMesh3D # Create a TriangleMesh3D instance mesh = TriangleMesh3D(vertices=..., triangles=...) # Compute the bounding box of the mesh mesh.compute_bounding_box() # The bounding box is now available in the `bounding_box` attribute mesh.bounding_box