Fit concave hull 2D

Fits a 2D concave hull to all objects in a collection.

Description

Fits a 2D concave hull to all objects in a collection. Each input object will be fit with a single concave hull. Even for non-contiguous input objects, a single concave hull will be created. The smoothness of the output hull is controlled by the "range" parameter, with smaller range values more closely following the surface of the object. Larger range values should be used to overcome gaps in object edges.

Generated concave hulls are set as children of their respective input object. If objects are in 3D, a Z-projection of the object is used.

The implementation used in this module ("chi-shapes") is entirely from the "Concave hulls" library by Glenn Hudson and Matt Duckham (link). A paper with full details of the characteristic hulls algorithm is published in Pattern Recognition:

Duckham, M., Kulik, L., Worboys, M.F., Galton, A. (2008) "Efficient generation of simple polygons for characterizing the shape of a set of points in the plane", Pattern Recognition, 41, 3224-3236 (PDF, DOI).

Parameters

ParameterDescription
Input objectsInput objects to create 2D concave hulls for. Each convex hull will be a child of its respective input object.
Output objectsOutput concave hull objects will be stored in the workspace with this name. Each concave hull object will be a child of the input object it was created from.
Range (px)The maximum gap in the surface (edge) of an object that the hull can smooth over. For gaps larger than this the hull will follow the discontinuity.