mesh_bounding_box_xy

compas.datastructures.mesh_bounding_box_xy(mesh)[source]

Compute the (axis aligned) bounding box of a projection of the mesh in the XY plane.

Parameters

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

Returns

list[list[float]] – The 4 corners of the bounding polygon in the XY plane.

Examples

>>> from compas.datastructures import Mesh
>>> mesh = Mesh.from_obj(compas.get('faces.obj'))
>>> mesh_bounding_box_xy(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]]