mesh_bounding_box

compas.datastructures.mesh_bounding_box(mesh)[source]

Compute the (axis aligned) bounding box of a mesh.

Parameters

mesh (compas.datastructures.Mesh) – The mesh data structure.

Returns

list of point – The 8 corners of the bounding box of the mesh.

Examples

>>> from compas.datastructures import Mesh
>>> mesh = Mesh.from_obj(compas.get('faces.obj'))
>>> mesh_bounding_box(mesh)
[[0.0, 0.0, 0.0], [10.0, 0.0, 0.0], [10.0, 10.0, 0.0], [0.0, 10.0, 0.0], [0.0, 0.0, 0.0], [10.0, 0.0, 0.0], [10.0, 10.0, 0.0], [0.0, 10.0, 0.0]]