Skip to content

Cluster

Cluster field of points to identify pockets.

cluster_fop(fop, clustering_model=None, clustering_kwargs=None)

Takes the coordinates of the field of points (fop) and uses a clustering algorithm to trim the fop to the points. Keeps the cluster that contains the center of the pocket.

PARAMETER DESCRIPTION
fop

coordinates of field of points.

TYPE: Sequence[Sequence[float]]

clustering_model

Scikit-learn clustering model class to use.

TYPE: type | None DEFAULT: None

clustering_kwargs

Keyword arguments for clustering_model initialization.

TYPE: MutableMapping[str, Any] | None DEFAULT: None

RETURNS DESCRIPTION
Sequence[Sequence[float]]

field of points after clustering