Skip to content
Shapemetry

@huukhanhnguyen/model / core/inspect

core/inspect

curveMetrics()

curveMetrics(points): CurveMetrics

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

Parameters

points

Point[]

Returns

CurveMetrics


formatInspect()

formatInspect(report, options?): string

Parameters

report

InspectReport

options?

trace?

boolean

Returns

string


growthAllowance()

growthAllowance(spanBefore, numericArgs): number

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

Parameters

spanBefore

number

numericArgs

number[]

Returns

number


inspectModel()

inspectModel(json, options): InspectReport

Parameters

json

ModelJSON

options

clashes?

boolean

Report coarse bbox-overlap pairs between visible groups.

geometry?

boolean

Attach full tessellation per group (for external tools, not prose).

params?

Record<string, unknown>

registry

Registry

Returns

InspectReport


meshMetrics()

meshMetrics(meshes): MeshMetrics

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.

Parameters

meshes

MeshData[]

Returns

MeshMetrics

Last updated: 📖 1 min readEdit on GitHub