Model - Point cloud value
API reference for src/nodeMethods/pointCloudValue on @huukhanhnguyen/model, reachable from ./compute.
See the Guide for the ModelJSON / evaluate pipeline.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
bounds
function
World-space bounding box (min + max corner) of a point set.
bounds(points: unknown): { min: Point$1; max: Point$1; }cluster
function
Seeded k-means. labels is parallel to points and stable across runs for the same seed.
cluster(points: unknown, k: number, seed: number): { labels: number[]; centers: Point$1[]; }convexHull
function
Convex hull of a point set, taken in its own best-fit plane and returned in world space. Fewer than 3 points returns the input verbatim (no meaningful hull).
convexHull(points: unknown): Point$1[]downsample
function
Voxel-grid downsample (Open3D voxel_down_sample semantics): one representative per occupied cell of size spacing, that cell's own point centroid. Deterministic ordering.
downsample(points: unknown, spacing: number): Point$1[]fitPlane
function
Least-squares best-fit plane through a point set — the smallest principal axis (minimum spread) as the plane normal, through the centroid. Returns the SAME {point, normal} shape as nodeMethods/plane.ts's Plane, so it composes directly with every Plane.* function and any plane-typed arg.
fitPlane(points: unknown): { point: Point$1; normal: Vector; }nearest
function
The count closest points to query, distance ascending. count = 1 yields the single nearest point rather than a one-element array.
nearest(points: unknown, query: Point$1, count?: number): Point$1 | Point$1[]normals
function
Per-point normal via local PCA over the neighborCount nearest points. Returned Vector[] is parallel to points.
normals(points: unknown, neighborCount?: number): Vector[]principalAxes
function
Principal axes of a point set, longest spread first, as an orthonormal frame through the centroid with each axis's length the spread along it. Degenerate (empty) input returns the standard basis, all lengths 0.
principalAxes(points: unknown): { center: Point$1; axes: [Point$1, Point$1, Point$1]; lengths: [number, number, number]; }