mymesh.utils.AABB#
- mymesh.utils.AABB(Points)[source]#
Calculate the axis-aligned bounding box of a set of points
- Parameters:
Points (array_like) – nx3 point coordinates.
- Returns:
aabb – Coordinates of the corners of the AABB
- Return type:
np.ndarray
Examples
import mymesh import numpy as np # Load the stanford bunny m = mymesh.demo_mesh('bunny') # Perform an arbitrary rotation transformation to the mesh m = m.Transform([np.pi/6, -np.pi/6, np.pi/6], transformation='rotation', InPlace=True) mvbb = utils.AABB(m.NodeCoords) box = mymesh.primitives.Box(mvbb, Type='surf')