Skip to content
Shapemetry

Model - PointCloud functions

Every function callable as PointCloud.* inside an expression — an argument input, a parameter binding, a table cell. Pure: no side effects, no async.

FunctionReturnsDescriptionArgTypeMeaning
PointCloud.bounds(points)boundsWorld-space bounding box (min + max corner) of a point set.pointspoint[] | pointEntity[]the point set
PointCloud.centroid(points)pointArithmetic mean of a point set.pointspoint[] | pointEntity[]the point set
PointCloud.cluster(points, k, seed)clusterSeeded k-means (k-means++ init, fixed iteration count). labels[] is parallel to points, stable across runs for the same seed.pointspoint[] | pointEntity[]the point set
knumbercluster count
seednumberRNG seed — same seed always gives the same labels/centers
PointCloud.convexHull(points)point[]Convex hull of a point set, projected onto its own best-fit plane and reprojected back to world space.pointspoint[] | pointEntity[]the point set
PointCloud.downsample(points, spacing)point[]Voxel-grid downsample (Open3D voxel_down_sample semantics) — one representative (the cell's own centroid) per occupied voxel.pointspoint[] | pointEntity[]the point set
spacinglengthvoxel cell size, mm
PointCloud.fitPlane(points)planeLeast-squares best-fit plane through a point set (smallest principal axis as the normal).pointspoint[] | pointEntity[]the point set
PointCloud.nearest(points, query, count)point | point[]count=1 (default) returns the single closest point; count>1 returns the count closest points sorted by distance. Ties broken by input order.pointspoint[] | pointEntity[]the point set
querypointthe query point
countnumberhow many to return, default 1
PointCloud.normals(points, neighbors)vector[]Per-point normal via local PCA over the k nearest neighbors (smallest principal axis) — parallel to points.pointspoint[] | pointEntity[]the point set
neighborsnumberk nearest neighbors per local PCA fit, default 12
PointCloud.principalAxes(points)principalAxesPCA decomposition: center + 3 orthonormal axes sorted by descending spread, with their lengths (mm).pointspoint[] | pointEntity[]the point set
Last updated: 📖 2 min readEdit on GitHub