Types - Inspect
API reference for ./evaluate/inspect on @huukhanhnguyen/types.
See the Guide for the package's role.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
CurveMetrics
type
type CurveMetrics
// = {
closed: boolean;
length: number;
/** Loop orientation in the XY plane; null for open or non-planar curves. */
winding: "CW" | "CCW" | null;
/** null when the curve isn't planar-XY (test not applicable). */
selfIntersects: boolean | null;
}InspectClash
type
type InspectClash
// = {
a: string;
b: string;
overlap: number;
}InspectCounts
type
type InspectCounts
// = {
curves: number;
faces: number;
points: number;
meshes: number;
groups: number;
annotations: number;
hidden: number;
}InspectGroup
type
type InspectGroup
// = {
key: string;
hidden: boolean;
counts: InspectCounts;
bounds: BoundingBox | null;
materials: string[];
layers: string[];
/** Tessellated mesh diagnostics when the group carries faces. */
mesh?: MeshMetrics;
steps: InspectStep[];
warnings: string[];
/** Full tessellation — only with the `geometry` option (external tools). */
tessellation?: {
meshes: {
positions: number[];
indices: number[];
}[];
curves: {
points: Point[];
}[];
};
}InspectReport
type
type InspectReport
// = {
title?: string;
unit?: string;
parameters: Array<{
key: string;
value: unknown;
}>;
groups: InspectGroup[];
/** Coarse bbox-overlap pairs — only with the `clashes` option. */
clashes?: InspectClash[];
/** Every group/step warning, prefixed with its path — scan this first. */
warnings: string[];
}InspectStep
type
type InspectStep
// = {
key: string;
method: string;
counts: InspectCounts;
bounds: BoundingBox | null;
/** Tessellated curve diagnostics when the step's value is one curve. */
curve?: CurveMetrics;
error?: string;
warnings: string[];
/** Present when the step is a nested container: its own pipeline. */
steps?: InspectStep[];
}MeshMetrics
type
type MeshMetrics
// = {
/** Signed volume — negative on a sealed mesh means inverted winding. */
volume: number;
/** True when every edge is shared by exactly two triangles. */
sealed: boolean;
boundaryEdges: number;
triangles: number;
degenerate: number;
/** Connected components (vertex-connectivity) — one per separate solid/sheet. */
solids: number;
/** Sealed components with negative volume: inside-out (e.g. an unflipped mirror copy). */
invertedSolids: number;
}