export interface VerifyCheck { name: string; passed: boolean; detail?: string; } export interface VerifyMeasurements { volume?: number; area?: number; /** Volume centroid `[x, y, z]`. Absent when center-of-mass can't be computed. */ centerOfMass?: readonly [number, number, number]; bounds?: { xMin: number; xMax: number; yMin: number; yMax: number; zMin: number; zMax: number; }; } /** Topology element counts — a quick structural fingerprint of a shape. */ export interface VerifyTopology { faceCount: number; edgeCount: number; wireCount: number; vertexCount: number; /** True when every shell is manifold. Absent for shapes without shells (nothing to assess). */ manifold?: boolean; } /** A failure captured with whatever structured context it carried (a `BrepError` code/suggestion). */ export interface ErrorInfo { message: string; code?: string | undefined; suggestion?: string | undefined; } export interface VerifyHint { code: string; message: string; fix: string; nextStep: string; } /** One measured-vs-expected comparison from a part's `export const expected`. */ export interface VerifyAssertion { name: string; expected: number; /** The measured value, or null when the part produced no such measurement. */ actual: number | null; passed: boolean; } /** Per-body fingerprint for multi-body / assembly parts. Absent for single-solid parts. */ export interface BodyInfo { index: number; volume: number; bounds?: VerifyMeasurements['bounds']; /** validSolid(body) — already computed in the allBodiesValid check. */ valid: boolean; } /** Pairwise spatial relationship between two bodies. One entry per unordered pair. */ export interface BodyRelation { a: number; b: number; /** Min surface-surface distance. 0 ≈ touching/overlapping. Absent when not measured (far pair). */ clearance?: number; relation: 'separate' | 'touching' | 'interfering' | 'nested'; /** Overlap volume — only populated for 'interfering'/'nested'. */ interferenceVolume?: number; } /** * An internal cylindrical feature (a bore / drilled hole), detected by an outward-normal-vs-radial * test (concave) + a substantial angular extent (so corner/edge fillets don't count). The axis line * lets a later phase aim a section cut or anchor a feature mark; the radius is the bore size. */ export interface BoreInfo { radius: number; /** A point on the bore's axis line. */ axisOrigin: readonly [number, number, number]; /** Unit direction of the bore axis. */ axisDir: readonly [number, number, number]; } /** * Deterministic, render-free manufacturability metrics. Computed only on demand (CLI `--metrics`); * absent otherwise and on degenerate shapes. Informs the judge — never gates a part on its own. */ export interface VerifyManufacturability { /** Smallest substantial analytic-cylinder radius (bore/pin/shaft; fillet strips excluded). Absent if none. */ minRadius?: number; /** Best-effort min wall thickness; absent when not computable. */ minWallThickness?: number; /** The detected internal bores (axis + radius) — for aimed sections / feature marks. The internal * bore *count* is `bores.length` (derived on read, not stored, so the two can't drift). */ bores?: BoreInfo[]; /** True when the relation matrix was capped by the pair/time budget (not exhaustive). */ relationsTruncated?: boolean; /** Conservative deterministic flags no process tolerates (e.g. zero-thickness body). */ violations: string[]; } export interface VerifyReport { shapeType: string | null; checks: VerifyCheck[]; measurements: VerifyMeasurements; /** Topology element counts. Absent when traversal fails on a degenerate shape. */ topology?: VerifyTopology; errors: string[]; /** Structured copies of `errors`, carrying any `BrepError` code/suggestion. Drives `hints`. */ errorInfos: ErrorInfo[]; /** Actionable, code-keyed guidance derived from `errorInfos`. */ hints: VerifyHint[]; /** * Non-failing advisories surfaced on the default `--check` path (do NOT affect `ok`). The author * runs `--check` without `--metrics`, so a part that came back as many un-welded bodies is otherwise * invisible to them — the dominant design defect in eval. A multi-body Compound gets a note here. */ notes?: string[]; /** * Measured-vs-expected comparisons from a part's `export const expected`. Empty when the part * declares no expectations; when non-empty, `ok` additionally requires every assertion pass. */ assertions: VerifyAssertion[]; /** Per-body breakdown for multi-body parts. Absent unless metrics were requested + bodies > 1. */ bodies?: BodyInfo[]; /** Pairwise body relationships. Absent unless metrics were requested + bodies > 1. */ bodyRelations?: BodyRelation[]; /** Deterministic manufacturability metrics. Absent unless metrics were requested. */ manufacturability?: VerifyManufacturability; } export interface BoundsDelta { xMin: number; xMax: number; yMin: number; yMax: number; zMin: number; zMax: number; } export interface DiffReport { volumeDelta: number; areaDelta: number; bboxDelta: BoundsDelta; symmetricDifferenceVolume: number; errors: string[]; } export declare function emptyReport(): VerifyReport; export declare function pushError(r: VerifyReport, info: ErrorInfo): void; export declare function reportOk(r: VerifyReport): boolean; /** Synthetic code attached to validity-check failures (validSolid returns a plain string error). */ export declare const VALIDITY_FAILURE_CODE = "VALIDATION_FAILED"; export declare function hintFor(info: ErrorInfo): VerifyHint | null; export declare function buildHints(r: VerifyReport): VerifyHint[]; export declare function serializeReport(r: VerifyReport): string;