convex_hull_numpy

compas.geometry.convex_hull_numpy(points)[source]

Compute the convex hull of a set of points.

Parameters:
pointsarray_like[point]

XYZ coordinates of the points.

Returns:
ndarray[int](N, )

Indices of the points on the hull.

ndarray[int](M, 3)

Faces of the hull.

Raises:
ValueError

If the input data is not 3D.

Notes

The faces of the hull returned by this function do not necessarily have consistent cycle directions. To obtain a mesh with consistent cycle directions, construct a mesh from the returned vertices, this function should be used in combination with compas.topology.unify_cycles().