Skip to content
Shapemetry

Model - Inspect

API reference for src/core/inspect on @huukhanhnguyen/model, reachable from ..

See the Guide for the ModelJSON / evaluate pipeline.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

curveMetrics

function

Closure, length, XY winding and self-intersection over a tessellated polyline. Winding/self-intersection only apply to closed planar-XY loops (null otherwise).

curveMetrics(points: Point$1[]): CurveMetrics

formatInspect

function

formatInspect(report: InspectReport, options?: { trace?: boolean; }): string

growthAllowance

function

Max span growth a local modifier's numeric arguments justify. Exported for direct testing of the warning rule.

growthAllowance(spanBefore: number, numericArgs: number[]): number

inspectModel

function

inspectModel(json: ModelJSON, options: { registry: Registry; params?: Record<string, unknown>; /** Report coarse bbox-overlap pairs between visible groups. */ clashes?: boolean; /** Attach full tessellation per group (for external tools, not prose). */ geometry?: boolean; }): InspectReport

meshMetrics

function

Signed volume, watertightness and degenerate-triangle count over a triangle mesh, plus per-connected-component (per-solid) volume signs — aggregate volume alone hides an inverted mirror copy cancelling its original. Faces are tessellated independently, so vertex/edge sharing is detected by quantized COORDINATES, not indices.

meshMetrics(meshes: Array<{ positions: number[]; indices?: number[]; faces?: number[][]; }>): MeshMetrics
Last updated: 📖 1 min readEdit on GitHub