Skip to content
Shapemetry

Model - Face value

API reference for src/nodeMethods/faceValue 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.

area

function

Untrimmed surface area: closed form on a recovered plane / sphere / cylinder / torus, else Gauss–Legendre of |Su × Sv|. A trimmed surface throws.

area(surface: NurbsSurface): number

centroid

function

Solid centroid, world space — the kernel's center of mass when the set bounds a volume, else the area-weighted FACE centroid (see module doc). [0,0,0] for no faces.

centroid(input: unknown): Point$1

contains

function

True if a point lies inside the face (within the outer loop, outside holes), projected onto the face's plane.

contains(face: Shell, point: Point$1): boolean

normal

function

Box-Muller normal draw for (seed, index).

normal(seed: number, index: number, mean?: number, std?: number): number
Last updated: 📖 1 min readEdit on GitHub