NativeCAD Kernel SDK

The SDK API reference

Every export of the two packages you can build on — @nativecad/kernel 0.3.3 and @nativecad/kernel-sdk 0.2.3 — with the signature tsc hands your editor.

This page is generated from the type declarations that ship in each package, not written. Signatures are re-printed by the TypeScript compiler, the prose is each declaration's own JSDoc, and the install and quickstart blocks are lifted from the package READMEs, so none of it can drift from what npm install delivers.

2packages
146exports
669documented items
265typed
63partly typed
341loose

About the loose typings. The kernel is hand-written JavaScript at 0.x. Its headline operations — primitives, extrude, revolve, loft, shell, holes, blends, chamfers, booleans, transforms, patterns — carry real signatures. The long tail is shipped and tested but still declared as any, Function or Record<string, any>; those are marked loose 0.x typing here rather than left out, and a signature with an any hole in it is marked partly typed. For a loose member, the contract is the header comment of its ops/<name>.js source. A documented item is a top-level export or a member of a namespace object such as ops.primitives.


181 entries

Lengths are millimetres, angles are radians, +Z is up; outer profile loops wind counter-clockwise and hole loops clockwise — the same conventions the MCP server publishes.

Kernel SDK

@nativecad/kernel 0.3.3

The solid-modeling kernel itself, as a library: STEP in and out, B-rep feature ops, tessellation, volume meshing, CAE export. This is what the Kernel SDK licence covers.

Zero-dependency JavaScript solid-modeling kernel: STEP AP242 read/write, B-rep feature ops (extrude, revolve, loft, shell, holes, fillets, chamfers, booleans, patterns), watertight surface tessellation, constrained-Delaunay volume meshing, CAE export (Nastran/Abaqus/VTK), and mass properties. No WASM, no native binaries.

Install

npm install https://featureboard.ai/nativecad/releases/nativecad-kernel-0.3.3.tgz

Quickstart

const cad = require('@nativecad/kernel');           // or: import cad from '@nativecad/kernel'
cad.setLicenseKey(process.env.NATIVECAD_KEY);

const res = cad.solveStepFile('part.step', { targetCount: 20000 });
// res.mesh  = { vertices, indices, normals, lineIndices, triangleFaceIds }
// res.stats = { vertices, triangles, faces, solids }
console.log(res.stats);

const props = cad.MassProperties.compute(res.mesh); // volume, centroid, inertia

Both blocks are lifted from packages/kernel/README.md. 104 exports, 621 documented items: 219 typed, 61 partly typed, 341 loose.

mesh pipeline payloads (docs/EMBED.md shape) · 6

MeshPayload interface

interface MeshPayload
MemberDeclarationNotes
verticesvertices: number[]Flat xyz triples.
indicesindices: number[]Triangle index list into vertices (3 per triangle).
normalsnormals: number[]Per-vertex normals, flat xyz triples.
lineIndiceslineIndices: number[]Feature-edge index list into vertices (2 per segment).
triangleFaceIdstriangleFaceIds: number[]One STEP face id per triangle (empty for STL input).

SolveStats interface

interface SolveStats
MemberDeclarationNotes
verticesvertices: number—
trianglestriangles: number—
facesfaces: number | nullUnique B-rep face count, or null when face identity is absent.
solidssolids?: number—

LogLine interface

interface LogLine
MemberDeclarationNotes
tsts: string—
levellevel: string—
messagemessage: string—

SolveOptions interface

interface SolveOptions
MemberDeclarationNotes
targetCounttargetCount?: numberApproximate triangle budget for the tessellator.
healheal?: booleanRun geometry healing during tessellation.
params loose 0.x typingparams?: Record<string, unknown>Advanced: raw SurfaceTessellator parameter overrides.

convenience pipeline · 14

solveStl function

Parse STL from a Buffer/ArrayBuffer or file path.

function solveStl(input: Buffer | ArrayBuffer | string): SolveResult;

writeStep function

Serialize a (possibly modified) StepParser back to STEP text.

function writeStep(parser: StepParser): string;

PcbImportInput interface

CADSF-1750 (PCB [5/10]): where a PCB layout comes from.

interface PcbImportInput
MemberDeclarationNotes
pathpath?: stringA .kicad_pcb file, an IPC-2581 .xml, a folder holding a Gerber X2/X3 + Excellon set, or (with content) a label.
filesfiles?: string[]The files of ONE Gerber set, relative to path when it is a folder.
contentcontent?: stringThe file's text inline (.kicad_pcb, IPC-2581 XML or one Gerber layer).
formatformat?: 'auto' | 'kicad_pcb' | 'gerber-set' | 'ipc2581'Default: detected from the extension, then the content (.kicad_pcb, a Gerber folder / files list, an IPC-2581 .xml / .cvg).
baseDirbaseDir?: stringRelative paths resolve against this.

PcbImportOptions interface

CADSF-1750: ops/pcbImport.js options — ops/pcbSolids.js's build knobs plus the import/reader ones.

interface PcbImportOptions
MemberDeclarationNotes
layerslayers?: string[]—
netsnets?: Array<string | number>—
bodyPerbodyPer?: 'layer_net' | 'layer' | 'net'—
dielectricdielectric?: 'embedded' | 'conformal' | 'none'—
viasvias?: 'barrel' | 'solid'—
platingplating?: number—
copperStackingcopperStacking?: 'outside' | 'inside'—
arcTolarcTol?: number—
minDistanceminDistance?: number—
minFeatureminFeature?: number—
dropVoidsBelowdropVoidsBelow?: number—
keepUnnettedkeepUnnetted?: booleanDefault: true for a Gerber set, false for KiCad.
cutoutcutout?: { nets?: Array<string | number>; signalNets?: Array<string | number>; referenceNets?: Array<string | number>; expansion?: number; extent?: 'conforming' | 'convex_hull' | 'bbox'; keepVoids?: boolean; }Give nets (every net inside the region is kept) OR signalNets [+ referenceNets] (only those nets are kept).
fillAllViasfillAllVias?: booleanBuild every via as a filled solid, not a barrel. Default false.
removeSinglePinComponentsremoveSinglePinComponents?: booleanDrop the pads of single-pin components (needs X2 pin data). Default false.
mirrorYmirrorY?: booleanDefault: from the model's y axis (KiCad is y-down, so true).
exactDrillsexactDrills?: boolean—
fillInnerfillInner?: boolean—
checkcheck?: boolean | 'document'—
faceBudgetfaceBudget?: numberRefuse (pcb_face_budget_exceeded) above this estimated face count. Default 90000.
colourcolour?: booleanFace colours by net (ops/faceColour.js), written as STEP STYLED_ITEM colour. Default true.
stackupstackup?: string | Record<string, unknown>Gerber: a stackup.json path or object.
viaMaxDrillviaMaxDrill?: number—
toleranttolerant?: boolean—

PcbImportBody interface partly typed

interface PcbImportBody
MemberDeclarationNotes
solidIdsolidId: string—
namename: string<layer>:<net>#<n> — also the STEP PRODUCT name.
tag partly typedtag: { kind: 'copper' | 'via' | 'dielectric'; layer: string; net: string | null; z0: number; z1: number; thickness: number; material: string | null; epsilon_r: number | null; loss_tangent: number | null; [key: string]: any; }—
rgbrgb: [ number, number, number ]—

PcbImportResult interface partly typed

interface PcbImportResult
MemberDeclarationNotes
parserparser: StepParser—
bodiesbodies: PcbImportBody[]—
report loose 0.x typingreport: Record<string, any>Per-layer table, volume audit, watertightness, face count/estimate, reader warnings.

LatticeFillCell type

CADSF-1768 (IMPLICIT [5/8]): lattice_fill's cells — TPMS sheets, then strut cells.

type LatticeFillCell = 'gyroid' | 'schwarzP' | 'schwarzD' | 'sc' | 'bcc' | 'fcc' | 'octet' | 'diamond' | 'kelvin' | 'bccz' | 'fccz';

LatticeFillDensity type

Graded feature size: the VALUES are the local strutRadius / sheetThickness in mm.

type LatticeFillDensity = {
    kind?: 'uniform';
} | {
    kind: 'gradient';
    from: number;
    to: number;
    axis: 'x' | 'y' | 'z' | Vec3;
    span?: [
        number,
        number
    ];
} | {
    kind: 'field';
    grid: {
        origin: Vec3;
        spacing: number | Vec3;
        dims: [
            number,
            number,
            number
        ];
        values: number[];
    };
};

LatticeFillOptions interface partly typed

interface LatticeFillOptions
MemberDeclarationNotes
cellcell: LatticeFillCell—
cellSizecellSize?: numberCubic cell edge (struts) or TPMS period, mm; period is the same number.
periodperiod?: number—
strutRadiusstrutRadius?: numberStrut cells: strut radius, mm.
sheetThicknesssheetThickness?: numberTPMS: the sheet's area-weighted MEAN wall thickness, mm.
skinskin?: numberSolid skin kept inside the body surface, mm (default 0 = none).
densitydensity?: LatticeFillDensity—
hh?: numberExtraction grid step, mm; default min(strutRadius, sheetThickness)/8 coarsened to maxTriangles, never past two cells across the thinnest wall.
outputoutput?: 'mesh' | 'brep''mesh' (default) or 'brep' (converge <= 12000 triangles, else the polyhedral facet lift <= 40000).
maxTrianglesmaxTriangles?: numberTriangle budget for the automatic h (default 2e6); an explicit h over it is refused.
volumeHvolumeH?: numberQuadrature step for the volumes (default min(h, resolution floor / 2)).
originorigin?: Vec3Lattice pattern origin (default: the body's bbox min corner).
fieldRoutefieldRoute?: 'auto' | 'recipe' | 'bvh'Body field route: 'auto' (a verified CSG recipe, else faces+bvh), 'recipe', 'bvh'.
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

LatticeFillResult interface partly typed

interface LatticeFillResult
MemberDeclarationNotes
parserparser: StepParser—
solidIdsolidId: number | string | nullThe published solid for output 'brep'; null for output 'mesh'.
sourceSolidIdsourceSolidId: string—
meshmesh?: { vertices: number[][]; faces: number[][]; }output 'mesh': the watertight extraction (ops/meshHeal.js's shape — the meshId channel).
report loose 0.x typingreport: Record<string, any>volume {value, errorEstimate, errorBar, mesh}, skinVolume, interiorVolume, bodyVolume, relativeDensity (+ relativeDensityError), fillDensity, analyticEstimate, cells / cellsFull / cellsReaching, struts, h / hRule, census (closed/manifold/genus), watertight, field route, extractor, route (brep), ms. See ops/latticeFill.js's header.

latticeFill function partly typed

CADSF-1768: fill a solid's interior with a strut or TPMS lattice under a solid skin (ops/latticeFill.js). Refusals throw with .code (lattice_fill_*) and .remedy.

function latticeFill(parser: StepParser | any, solidId: number | string, opts: LatticeFillOptions): LatticeFillResult;

core classes (loose 0.x typings) · 8

StepParser class partly typed

class StepParser
MemberDeclarationNotes
parseparse(filePath: string): { solids: Array<{ id: number; }>; }—
instancesinstances: Map<number, unknown>—
MAX_RESOLVE_DEPTH loose 0.x typingstatic MAX_RESOLVE_DEPTH: anyRuntime static number member; present on the shipped object, type not declared.
ShardedMap loose 0.x typingstatic ShardedMap(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
StepStringLiteral loose 0.x typingstatic StepStringLiteral(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
asPlainString loose 0.x typingstatic asPlainString(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
bodySurvey loose 0.x typingbodySurvey(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
buildBRep loose 0.x typingbuildBRep(...args: any[]): anyRuntime method taking 0 declared parameters; present on the shipped object, signature not typed.
checkUnitContextUse loose 0.x typingcheckUnitContextUse(...args: any[]): anyRuntime method taking 0 declared parameters; present on the shipped object, signature not typed.
declaredToleranceOf loose 0.x typingdeclaredToleranceOf(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
decodeLabel loose 0.x typingstatic decodeLabel(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
deleteEntity loose 0.x typingdeleteEntity(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
formatArg loose 0.x typingformatArg(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
instancesRebinds loose 0.x typingstatic instancesRebinds(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
invalidToleranceOf loose 0.x typinginvalidToleranceOf(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
markDirty loose 0.x typingmarkDirty(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
newEntity loose 0.x typingnewEntity(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
newInstanceStore loose 0.x typingstatic newInstanceStore(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
noteWrite loose 0.x typingstatic noteWrite(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
parseArgs loose 0.x typingparseArgs(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
parseComplexEntity loose 0.x typingparseComplexEntity(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
parseEntity loose 0.x typingparseEntity(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
parseTextFast loose 0.x typingparseTextFast(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
resolveEntity loose 0.x typingresolveEntity(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
resolveEntityShared loose 0.x typingresolveEntityShared(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
scrubComments loose 0.x typingstatic scrubComments(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
trackedScope loose 0.x typingstatic trackedScope(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
unitContextUse loose 0.x typingunitContextUse(...args: any[]): anyRuntime method taking 0 declared parameters; present on the shipped object, signature not typed.
unwrittenSince loose 0.x typingstatic unwrittenSince(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
withTrackedWrites loose 0.x typingstatic withTrackedWrites(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
writeAudit loose 0.x typingstatic writeAudit(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
writeAuditMisses loose 0.x typingstatic writeAuditMisses(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
writeEpoch loose 0.x typingstatic writeEpoch(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

StepWriter class partly typed

class StepWriter
MemberDeclarationNotes
constructorconstructor(parser: StepParser)—
toTexttoText(): string—
APPLICATION_CONTEXT loose 0.x typingstatic APPLICATION_CONTEXT: anyRuntime static string member; present on the shipped object, type not declared.
APPLICATION_PROTOCOL loose 0.x typingstatic APPLICATION_PROTOCOL: anyRuntime static string member; present on the shipped object, type not declared.
APPLICATION_PROTOCOL_YEAR loose 0.x typingstatic APPLICATION_PROTOCOL_YEAR: anyRuntime static number member; present on the shipped object, type not declared.
AUTHOR loose 0.x typingstatic AUTHOR: anyRuntime static string member; present on the shipped object, type not declared.
DEFAULT_SCHEMA_ID loose 0.x typingstatic DEFAULT_SCHEMA_ID: anyRuntime static string member; present on the shipped object, type not declared.
INSTANCE_ITEM_NAME loose 0.x typingstatic INSTANCE_ITEM_NAME: anyRuntime static string member; present on the shipped object, type not declared.
KERNEL loose 0.x typingstatic KERNEL: anyRuntime static string member; present on the shipped object, type not declared.
KERNEL_VERSION loose 0.x typingstatic KERNEL_VERSION: anyRuntime static string member; present on the shipped object, type not declared.
ORGANIZATION loose 0.x typingstatic ORGANIZATION: anyRuntime static string member; present on the shipped object, type not declared.
ORIGINATING_SYSTEM loose 0.x typingstatic ORIGINATING_SYSTEM: anyRuntime static string member; present on the shipped object, type not declared.
PREPROCESSOR loose 0.x typingstatic PREPROCESSOR: anyRuntime static string member; present on the shipped object, type not declared.
SCHEMA loose 0.x typingstatic SCHEMA: anyRuntime static string member; present on the shipped object, type not declared.
SCHEMAS loose 0.x typingstatic SCHEMAS: anyRuntime static object member; present on the shipped object, type not declared.
SCHEMA_IDS loose 0.x typingstatic SCHEMA_IDS: anyRuntime static array member; present on the shipped object, type not declared.
StepSchemaError loose 0.x typingstatic StepSchemaError(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
StepSchemaUnsupportedError loose 0.x typingstatic StepSchemaUnsupportedError(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
TOLERANCE_PROPERTY_NAME loose 0.x typingstatic TOLERANCE_PROPERTY_NAME: anyRuntime static string member; present on the shipped object, type not declared.
applyEdits loose 0.x typingstatic applyEdits(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
configureHeader loose 0.x typingstatic configureHeader(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
exportAssembly loose 0.x typingstatic exportAssembly(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
header loose 0.x typingstatic header(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
isAuthorableSchema loose 0.x typingstatic isAuthorableSchema(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
isOwnSchema loose 0.x typingstatic isOwnSchema(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
real loose 0.x typingstatic real(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
serializeArg loose 0.x typingstatic serializeArg(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
serializeEntity loose 0.x typingstatic serializeEntity(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
writeFile loose 0.x typingwriteFile(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

StlParser class partly typed

class StlParser
MemberDeclarationNotes
parseparse(filePath: string): MeshPayload—
MAX_TRIANGLES loose 0.x typingstatic MAX_TRIANGLES: anyRuntime static number member; present on the shipped object, type not declared.
isBinary loose 0.x typingisBinary(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
parseAscii loose 0.x typingparseAscii(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
parseBinary loose 0.x typingparseBinary(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

StlExporter class loose 0.x typing

class StlExporter
MemberDeclarationNotes
encodeBinary loose 0.x typingstatic encodeBinary(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
exportAscii loose 0.x typingstatic exportAscii(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
exportBinary loose 0.x typingstatic exportBinary(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

SurfaceTessellator class partly typed

class SurfaceTessellator
MemberDeclarationNotes
constructorconstructor(parser: StepParser)—
tessellatetessellate(solidId: number, targetCount?: number | null, opts?: { healGeometry?: boolean; }): MeshPayload—
mergeMeshesstatic mergeMeshes(meshes: MeshPayload[]): MeshPayload—
params loose 0.x typingparams: Record<string, unknown>—
ANALYTIC_RIM_DEFAULT_SEGMENTS_PER_TURN loose 0.x typingstatic ANALYTIC_RIM_DEFAULT_SEGMENTS_PER_TURN: anyRuntime static number member; present on the shipped object, type not declared.
ARC_WELD_FLOOR_K loose 0.x typingstatic ARC_WELD_FLOOR_K: anyRuntime static number member; present on the shipped object, type not declared.
ARC_WELD_TRIGGER_K loose 0.x typingstatic ARC_WELD_TRIGGER_K: anyRuntime static number member; present on the shipped object, type not declared.
AXIS_SEG_QUANTUM loose 0.x typingstatic AXIS_SEG_QUANTUM: anyRuntime static number member; present on the shipped object, type not declared.
BSPLINE_BASE_SAMPLES loose 0.x typingstatic BSPLINE_BASE_SAMPLES: anyRuntime static number member; present on the shipped object, type not declared.
BSPLINE_MAX_LEVELS loose 0.x typingstatic BSPLINE_MAX_LEVELS: anyRuntime static number member; present on the shipped object, type not declared.
BSPLINE_RELAX_MIN_PROBES_PER_CHORD loose 0.x typingstatic BSPLINE_RELAX_MIN_PROBES_PER_CHORD: anyRuntime static number member; present on the shipped object, type not declared.
BSPLINE_RELAX_MIN_SAMPLES loose 0.x typingstatic BSPLINE_RELAX_MIN_SAMPLES: anyRuntime static number member; present on the shipped object, type not declared.
BSPLINE_RELAX_PROBE_TOTAL loose 0.x typingstatic BSPLINE_RELAX_PROBE_TOTAL: anyRuntime static number member; present on the shipped object, type not declared.
CHEAP_PLANAR_MAX_EDGES loose 0.x typingstatic CHEAP_PLANAR_MAX_EDGES: anyRuntime static number member; present on the shipped object, type not declared.
CHORD_FLOOR_RADIUS_K loose 0.x typingstatic CHORD_FLOOR_RADIUS_K: anyRuntime static number member; present on the shipped object, type not declared.
CHORD_FLOOR_SCALE_K loose 0.x typingstatic CHORD_FLOOR_SCALE_K: anyRuntime static number member; present on the shipped object, type not declared.
CHORD_FLOOR_SEGS_PER_TURN loose 0.x typingstatic CHORD_FLOOR_SEGS_PER_TURN: anyRuntime static number member; present on the shipped object, type not declared.
DEFAULT_TRIM_SEAM_SLACK loose 0.x typingstatic DEFAULT_TRIM_SEAM_SLACK: anyRuntime static number member; present on the shipped object, type not declared.
DEFLECTION_MAX_POINTS loose 0.x typingstatic DEFLECTION_MAX_POINTS: anyRuntime static number member; present on the shipped object, type not declared.
DEFLECTION_MAX_ROUNDS loose 0.x typingstatic DEFLECTION_MAX_ROUNDS: anyRuntime static number member; present on the shipped object, type not declared.
DEFLECTION_MIN_TOL loose 0.x typingstatic DEFLECTION_MIN_TOL: anyRuntime static number member; present on the shipped object, type not declared.
DEFLECTION_TIE_REL loose 0.x typingstatic DEFLECTION_TIE_REL: anyRuntime static number member; present on the shipped object, type not declared.
HOLE_ROW_MAX_SITES loose 0.x typingstatic HOLE_ROW_MAX_SITES: anyRuntime static number member; present on the shipped object, type not declared.
INTERIOR_GRID_CAP_DEFAULT loose 0.x typingstatic INTERIOR_GRID_CAP_DEFAULT: anyRuntime static number member; present on the shipped object, type not declared.
ISO_CHORD_REL_RISE loose 0.x typingstatic ISO_CHORD_REL_RISE: anyRuntime static number member; present on the shipped object, type not declared.
QUALITY_DEFAULT_DEG loose 0.x typingstatic QUALITY_DEFAULT_DEG: anyRuntime static number member; present on the shipped object, type not declared.
QUALITY_MARGIN loose 0.x typingstatic QUALITY_MARGIN: anyRuntime static number member; present on the shipped object, type not declared.
QUALITY_OFFCENTER loose 0.x typingstatic QUALITY_OFFCENTER: anyRuntime static number member; present on the shipped object, type not declared.
QUALITY_RAIL_MAX loose 0.x typingstatic QUALITY_RAIL_MAX: anyRuntime static number member; present on the shipped object, type not declared.
QUALITY_STEINER_ITERS loose 0.x typingstatic QUALITY_STEINER_ITERS: anyRuntime static number member; present on the shipped object, type not declared.
QUALITY_STEINER_MAX_RING loose 0.x typingstatic QUALITY_STEINER_MAX_RING: anyRuntime static number member; present on the shipped object, type not declared.
RING_TOUCH_WORK_FLOOR loose 0.x typingstatic RING_TOUCH_WORK_FLOOR: anyRuntime static number member; present on the shipped object, type not declared.
RING_TOUCH_WORK_PER_ELEM loose 0.x typingstatic RING_TOUCH_WORK_PER_ELEM: anyRuntime static number member; present on the shipped object, type not declared.
RULED_MAX_ANISOTROPY loose 0.x typingstatic RULED_MAX_ANISOTROPY: anyRuntime static number member; present on the shipped object, type not declared.
SECANT_PATCH_MAX_SPAN loose 0.x typingstatic SECANT_PATCH_MAX_SPAN: anyRuntime static number member; present on the shipped object, type not declared.
SOR_DEFAULT_MAX_ROWS loose 0.x typingstatic SOR_DEFAULT_MAX_ROWS: anyRuntime static number member; present on the shipped object, type not declared.
SOR_DEFAULT_REL_SAG loose 0.x typingstatic SOR_DEFAULT_REL_SAG: anyRuntime static number member; present on the shipped object, type not declared.
SOR_RIM_SEGMENTS_PER_TURN loose 0.x typingstatic SOR_RIM_SEGMENTS_PER_TURN: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_KNOT_CELL_BUDGET_GATE loose 0.x typingstatic SPLINE_KNOT_CELL_BUDGET_GATE: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_KNOT_MAX_CELL_ASPECT loose 0.x typingstatic SPLINE_KNOT_MAX_CELL_ASPECT: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_KNOT_MAX_SEGS_PER_SPAN loose 0.x typingstatic SPLINE_KNOT_MAX_SEGS_PER_SPAN: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_KNOT_MIN_SEGS_PER_SPAN loose 0.x typingstatic SPLINE_KNOT_MIN_SEGS_PER_SPAN: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_KNOT_SAG_SAFETY loose 0.x typingstatic SPLINE_KNOT_SAG_SAFETY: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_KNOT_SITE_BUDGET_K loose 0.x typingstatic SPLINE_KNOT_SITE_BUDGET_K: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_KNOT_SITE_BUDGET_MAX loose 0.x typingstatic SPLINE_KNOT_SITE_BUDGET_MAX: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_KNOT_SITE_BUDGET_MIN loose 0.x typingstatic SPLINE_KNOT_SITE_BUDGET_MIN: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_SAG_DIAG_FRACTION loose 0.x typingstatic SPLINE_SAG_DIAG_FRACTION: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_SAG_MAX_SUBDIVISIONS loose 0.x typingstatic SPLINE_SAG_MAX_SUBDIVISIONS: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_SURFACE_DEFAULT_SAG_TOL loose 0.x typingstatic SPLINE_SURFACE_DEFAULT_SAG_TOL: anyRuntime static number member; present on the shipped object, type not declared.
SPLINE_SURFACE_MAX_V_SEGMENTS loose 0.x typingstatic SPLINE_SURFACE_MAX_V_SEGMENTS: anyRuntime static number member; present on the shipped object, type not declared.
SUBSTATION_MIN_FRAGMENTS loose 0.x typingstatic SUBSTATION_MIN_FRAGMENTS: anyRuntime static number member; present on the shipped object, type not declared.
TESS_MAX_SITES_DEFAULT loose 0.x typingstatic TESS_MAX_SITES_DEFAULT: anyRuntime static number member; present on the shipped object, type not declared.
TORUS_DEFAULT_SAG_MAX_ROWS loose 0.x typingstatic TORUS_DEFAULT_SAG_MAX_ROWS: anyRuntime static number member; present on the shipped object, type not declared.
TORUS_DEFAULT_SAG_MIN_RADIUS loose 0.x typingstatic TORUS_DEFAULT_SAG_MIN_RADIUS: anyRuntime static number member; present on the shipped object, type not declared.
TORUS_DEFAULT_SAG_TOL loose 0.x typingstatic TORUS_DEFAULT_SAG_TOL: anyRuntime static number member; present on the shipped object, type not declared.
TolerantVertexSites loose 0.x typingstatic TolerantVertexSites(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
VIRTUAL_SEAM_BACKTRACK loose 0.x typingstatic VIRTUAL_SEAM_BACKTRACK: anyRuntime static number member; present on the shipped object, type not declared.
addAxisToMesh loose 0.x typingaddAxisToMesh(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
addCylinderToMesh loose 0.x typingaddCylinderToMesh(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
calculateFaceArea loose 0.x typingcalculateFaceArea(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
calculateRequiredSubdivisions loose 0.x typingcalculateRequiredSubdivisions(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
edgeFaceIndexStats loose 0.x typingstatic edgeFaceIndexStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
edgePolylineStats loose 0.x typingedgePolylineStats(...args: any[]): anyRuntime method taking 0 declared parameters; present on the shipped object, signature not typed.
evaluateSurface loose 0.x typingevaluateSurface(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
extractStepEdges loose 0.x typingextractStepEdges(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
getEdgeMidPoint loose 0.x typinggetEdgeMidPoint(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
getEdgeStartPoint loose 0.x typinggetEdgeStartPoint(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
getLoopPoints2D loose 0.x typinggetLoopPoints2D(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
getNormal loose 0.x typinggetNormal(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
getSurfaceBasis loose 0.x typinggetSurfaceBasis(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
healSolid loose 0.x typinghealSolid(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
isPointInLoop3D loose 0.x typingisPointInLoop3D(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
isPointInLoopUV loose 0.x typingisPointInLoopUV(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
isPointInsideFace loose 0.x typingisPointInsideFace(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
minAngleStats loose 0.x typingstatic minAngleStats(...args: any[]): anyRuntime static method taking 3 declared parameters; present on the shipped object, signature not typed.
openSharedTolerantTopology loose 0.x typingstatic openSharedTolerantTopology(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
planeFaceRings loose 0.x typingplaneFaceRings(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
processSolid loose 0.x typingprocessSolid(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
projectToSurface loose 0.x typingprojectToSurface(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
snapWeld loose 0.x typingstatic snapWeld(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
sorDocStats loose 0.x typingstatic sorDocStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
tessellateCurvedSurface loose 0.x typingtessellateCurvedSurface(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
tessellateFace loose 0.x typingtessellateFace(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
tessellatePlane loose 0.x typingtessellatePlane(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
tessellateWithTargetCount loose 0.x typingtessellateWithTargetCount(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
tolBodyKeyStats loose 0.x typingstatic tolBodyKeyStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
tolFingerprintStats loose 0.x typingstatic tolFingerprintStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
tolTokenStats loose 0.x typingstatic tolTokenStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
useWasmAdjunct loose 0.x typingstatic useWasmAdjunct(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
wideWallCoverageDeclines loose 0.x typingstatic wideWallCoverageDeclines: anyRuntime static number member; present on the shipped object, type not declared.
withSharedEdgeFaceMap loose 0.x typingstatic withSharedEdgeFaceMap(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

Topology class loose 0.x typing

class Topology
MemberDeclarationNotes
constructorconstructor(parser: StepParser)—
AUTHORED_CAP_WELD_FLOORS loose 0.x typingstatic AUTHORED_CAP_WELD_FLOORS: anyRuntime static number member; present on the shipped object, type not declared.
DECLARED_TOLERANCE_CAP_K loose 0.x typingstatic DECLARED_TOLERANCE_CAP_K: anyRuntime static number member; present on the shipped object, type not declared.
GLOBAL_EPS loose 0.x typingstatic GLOBAL_EPS: anyRuntime static number member; present on the shipped object, type not declared.
RESABS_ABS loose 0.x typingstatic RESABS_ABS: anyRuntime static number member; present on the shipped object, type not declared.
RESABS_K loose 0.x typingstatic RESABS_K: anyRuntime static number member; present on the shipped object, type not declared.
SLIVER_SPIKE_RATIO loose 0.x typingstatic SLIVER_SPIKE_RATIO: anyRuntime static number member; present on the shipped object, type not declared.
STRAY_BODY_RATIO loose 0.x typingstatic STRAY_BODY_RATIO: anyRuntime static number member; present on the shipped object, type not declared.
TOLERANCE_CAP_MULTIPLIER loose 0.x typingstatic TOLERANCE_CAP_MULTIPLIER: anyRuntime static number member; present on the shipped object, type not declared.
bodyTolerance loose 0.x typingbodyTolerance(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
boolOperandScope loose 0.x typingstatic boolOperandScope(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
build loose 0.x typingbuild(...args: any[]): anyRuntime method taking 0 declared parameters; present on the shipped object, signature not typed.
buildStamp loose 0.x typingstatic buildStamp(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
cappedDeclaration loose 0.x typingstatic cappedDeclaration(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
combinedTolerance loose 0.x typingcombinedTolerance(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
documentScale loose 0.x typingstatic documentScale(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
documentToken loose 0.x typingstatic documentToken(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
dropScopeMemo loose 0.x typingstatic dropScopeMemo(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
edgeCount loose 0.x typingedgeCount: anyRuntime undefined member; present on the shipped object, type not declared.
edgeUses loose 0.x typingedgeUses(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
edgesOfVertex loose 0.x typingedgesOfVertex(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
faceCount loose 0.x typingfaceCount: anyRuntime undefined member; present on the shipped object, type not declared.
faceToleranceOf loose 0.x typingfaceToleranceOf(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
facesOfEdge loose 0.x typingfacesOfEdge(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
fromParser loose 0.x typingstatic fromParser(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
isSameFaceSeam loose 0.x typingisSameFaceSeam(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
isolatedRead loose 0.x typingstatic isolatedRead(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
isolatedReadStats loose 0.x typingstatic isolatedReadStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
neighborsOfFace loose 0.x typingneighborsOfFace(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
openOperandBuilds loose 0.x typingstatic openOperandBuilds(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
openScopeMemo loose 0.x typingstatic openScopeMemo(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
operandBuildStats loose 0.x typingstatic operandBuildStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
resetIsolatedReadStats loose 0.x typingstatic resetIsolatedReadStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
retessellate loose 0.x typingretessellate(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
rootRegistryStats loose 0.x typingstatic rootRegistryStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
sameBuildStamp loose 0.x typingstatic sameBuildStamp(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
scopeEdgeIds loose 0.x typingscopeEdgeIds(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
scopeMemoStats loose 0.x typingstatic scopeMemoStats(...args: any[]): anyRuntime static method taking 0 declared parameters; present on the shipped object, signature not typed.
scopedRead loose 0.x typingstatic scopedRead(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
shared loose 0.x typingstatic shared(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
sharedFor loose 0.x typingstatic sharedFor(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
shellEdgeCensus loose 0.x typingshellEdgeCensus(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
shellManifold loose 0.x typingshellManifold(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
toleranceOf loose 0.x typingtoleranceOf(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
toleranceSummary loose 0.x typingtoleranceSummary(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
tolerantPartnerOf loose 0.x typingtolerantPartnerOf(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
validate loose 0.x typingvalidate(...args: any[]): anyRuntime method taking 0 declared parameters; present on the shipped object, signature not typed.
validateShell loose 0.x typingvalidateShell(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
validateSolid loose 0.x typingvalidateSolid(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
vertexCount loose 0.x typingvertexCount: anyRuntime undefined member; present on the shipped object, type not declared.
withSharedBuilds loose 0.x typingstatic withSharedBuilds(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

VolumeMesher class loose 0.x typing

class VolumeMesher
MemberDeclarationNotes
formatQualityReport loose 0.x typingstatic formatQualityReport(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
fromSolid loose 0.x typingstatic fromSolid(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
mesh loose 0.x typingmesh(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
quality loose 0.x typingstatic quality(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
scopedImprove loose 0.x typingstatic scopedImprove(...args: any[]): anyRuntime static method taking 7 declared parameters; present on the shipped object, signature not typed.
sliverCensus loose 0.x typingstatic sliverCensus(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
splitSlivers loose 0.x typingstatic splitSlivers(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

Bvh class loose 0.x typing

class Bvh
MemberDeclarationNotes
BoxBvh loose 0.x typingstatic BoxBvh(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
aabb loose 0.x typingaabb: anyRuntime undefined member; present on the shipped object, type not declared.
closestOnTri loose 0.x typingstatic closestOnTri(...args: any[]): anyRuntime static method taking 4 declared parameters; present on the shipped object, signature not typed.
closestPair loose 0.x typingclosestPair(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
closestPoint loose 0.x typingclosestPoint(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
meshComponents loose 0.x typingstatic meshComponents(...args: any[]): anyRuntime static method taking 1 declared parameter; present on the shipped object, signature not typed.
minDistance loose 0.x typingminDistance(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
rayAll loose 0.x typingrayAll(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
rayTriangle loose 0.x typingstatic rayTriangle(...args: any[]): anyRuntime static method taking 5 declared parameters; present on the shipped object, signature not typed.
raycast loose 0.x typingraycast(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
segSegClosest loose 0.x typingstatic segSegClosest(...args: any[]): anyRuntime static method taking 4 declared parameters; present on the shipped object, signature not typed.
stats loose 0.x typingstatic stats: anyRuntime static object member; present on the shipped object, type not declared.
triDistance loose 0.x typingstatic triDistance(...args: any[]): anyRuntime static method taking 2 declared parameters; present on the shipped object, signature not typed.
triNormal loose 0.x typingtriNormal(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
triVerts loose 0.x typingtriVerts(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
windingNumber loose 0.x typingwindingNumber(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

namespaces · 5

topology const loose 0.x typing

const topology: Record<string, any>;

MassProperties namespace

MemberDeclarationNotes
compute loose 0.x typingcompute(mesh: MeshPayload): Record<string, any>Volume, centroid, and inertia from a closed surface mesh.

GeometryStats namespace

MemberDeclarationNotes
getStats loose 0.x typinggetStats(...args: any[]): Record<string, any>The geometry read a quoting/DFM front-end needs from a STEP model.

Queries const loose 0.x typing

const Queries: Record<string, any>;

CaeExporter namespace

MemberDeclarationNotes
toNastran partly typedtoNastran(...args: any[]): string—
toAbaqus partly typedtoAbaqus(...args: any[]): string—
toVtk partly typedtoVtk(...args: any[]): string—
ELEMENT_ORDERS loose 0.x typingELEMENT_ORDERS: anyRuntime array member; present on the shipped object, type not declared.
TET10_EDGES loose 0.x typingTET10_EDGES: anyRuntime array member; present on the shipped object, type not declared.
boundaryNodeIds loose 0.x typingboundaryNodeIds(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
nastranFloat loose 0.x typingnastranFloat(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
parseNastranReal loose 0.x typingparseNastranReal(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
pressureFacesOnNodes loose 0.x typingpressureFacesOnNodes(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
promoteNodeSet loose 0.x typingpromoteNodeSet(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
promoteToTet10 loose 0.x typingpromoteToTet10(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
toGmsh loose 0.x typingtoGmsh(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

shared shapes for ops.* (CADSF-1401) · 56

Vec2 type

type Vec2 = [
    number,
    number
];

Vec3 type

type Vec3 = [
    number,
    number,
    number
];

Profile2D type

A closed planar polygon: do not repeat the first point.

type Profile2D = Vec2[];

Polygon2d interface

CADSF-1748 ops.polygonBoolean: a 2-D region as one outer loop (CCW) and its holes (CW) - the shape ops.rectUnion also returns.

interface Polygon2d
MemberDeclarationNotes
outerouter: Vec2[]—
holesholes: Vec2[][]—

PolygonInput type

What every polygon operation ACCEPTS: a ring, a polygon-with-holes, or any array of those. {outer,holes} is re-wound on the way in.

type PolygonInput = Vec2[] | Polygon2d | Array<Vec2[] | Polygon2d | PolygonInput>;

PolygonPathSegment type

A stroke path: a polyline, or the reader's own segment chain (a line has start/end, an arc start/mid/end), or several of either.

type PolygonPathSegment = {
    kind: 'line';
    start: Vec2;
    end: Vec2;
} | {
    kind: 'arc';
    start: Vec2;
    mid: Vec2;
    end: Vec2;
};

Aperture2d type

A brush/flash outline: a round aperture's diameter, or a named convex shape.

type Aperture2d = number | {
    shape?: 'circle' | 'round' | 'rect' | 'oval' | 'obround' | 'roundrect' | 'regular' | 'polygon';
    r?: number;
    d?: number;
    w?: number;
    h?: number;
    rratio?: number;
    vertices?: number;
    rot?: number;
    points?: Vec2[];
};

PolygonBooleanOptions interface

interface PolygonBooleanOptions
MemberDeclarationNotes
resolutionresolution?: numbermm per integer grid unit; default 1e-6 (1 nm, KiCad's own unit).
fillRulefillRule?: 'nonzero' | 'evenodd'—
arcTolarcTol?: numbermm of chord sag when an arc or a round brush is discretised (default 0.005).
minQuadrantSegmentsminQuadrantSegments?: number—
strictstrict?: booleanRefuse a self-intersecting input ring by name instead of filling it.
verifyverify?: booleanRe-derive the sweep status at every slab and refuse on disagreement.
simplifysimplify?: boolean | { minDistance?: number; removeCollinear?: boolean; removeSpikes?: boolean; }—
maxSplitPassesmaxSplitPasses?: number—
snapRoundsnapRound?: booleanCADSF-2128: snap-round the edges when maxSplitPasses plain splitting passes do not settle them (default true); false refuses as before.

SketchPlane interface

An optional sketch frame for extrude(); omitted = world XY, sweep along +Z.

interface SketchPlane
MemberDeclarationNotes
originorigin?: Vec3—
xAxisxAxis?: Vec3—
yAxisyAxis?: Vec3—

Mat34 interface

A 3×4 rigid/affine transform: m is the 3×3 linear part, t the translation.

interface Mat34
MemberDeclarationNotes
mm: number[][]—
tt: Vec3—

ImplicitBox interface

CADSF-1764 ops.implicit: an axis-aligned box; components may be +-Infinity.

interface ImplicitBox
MemberDeclarationNotes
lolo: Vec3—
hihi: Vec3—

ImplicitField interface partly typed

CADSF-1764 ops.implicit: a scalar field whose solid is { p : f(p) <= 0 }. IMPLICIT [2-8] rely on f, bbox and exact only. Every field the module builds is 1-Lipschitz (bound), so |f| never overstates the distance to the surface; exactInside / exactOutside say on which side it IS the distance (union is exact outside, intersect exact inside).

interface ImplicitField
MemberDeclarationNotes
kindkind: string—
ff(p: Vec3 | number[]): number—
bboxbbox: ImplicitBoxContains the solid (conservative).
exactexact: booleanExact signed distance everywhere (= exactInside && exactOutside).
exactInsideexactInside: boolean—
exactOutsideexactOutside: boolean—
boundbound: boolean1-Lipschitz: a lower bound on the distance to the surface.
convexconvex: booleanf is a convex function.
gradgrad?(p: Vec3 | number[]): Vec3 | nullAnalytic gradient where trivial; null where undefined.
boxAtboxAt?(c: number): ImplicitBoxA box containing the sublevel set { f <= c }.
localizelocalize?(lo: Vec3, hi: Vec3): ImplicitLocalEvaluatorCADSF-2083: an evaluator for one block [lo, hi] that returns the SAME double as f at every point of it (lattice() builds one from a single BoxBvh query). ops.implicitGrid sparseSample (per 8^3 tile), dualContouring's Hermite refinement (per tile, CADSF-2133) and ops.implicitMeasure (per 8^3 octree block) use it when present. CADSF-2133: union / intersect (and the bbox clip) / transform of a localizing field localize too.
params loose 0.x typingparams?: Record<string, any>—

ImplicitLocalEvaluator interface

What {@link ImplicitField.localize} returns: f is exact only inside the block it was built for; candidates is how many items it scans.

interface ImplicitLocalEvaluator
MemberDeclarationNotes
ff(x: number, y: number, z: number): number—
candidatescandidates: number—

ImplicitStrut interface partly typed

A strut: ops/latticeCell.js's record shape (extra keys are ignored).

interface ImplicitStrut
MemberDeclarationNotes
p0p0: Vec3—
p1p1: Vec3—
rr: number—
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

ImplicitMatrix type

A similarity transform: Mat34, or a nested 4x4 (bottom row 0 0 0 1) / 3x4, row-major.

type ImplicitMatrix = Mat34 | number[][];

ImplicitTpmsOptions interface

interface ImplicitTpmsOptions
MemberDeclarationNotes
formform?: 'solid' | 'sheet''solid' (g <= t, default) or 'sheet' (|g - t| <= w/2).
ww?: numberSheet width in LEVEL units (not mm).
originorigin?: Vec3—
frameframe?: ImplicitMatrix—
withinwithin?: ImplicitFieldClamp to a bounding field (intersect; the result takes its bbox).

ImplicitLatticeField interface

interface ImplicitLatticeField extends ImplicitField
MemberDeclarationNotes
evalStatsevalStats(p: Vec3 | number[]): { f: number; candidates: number; queries: number; items: number; }The value plus the items and BoxBvh queries it took (instrumentation).
localizelocalize?(lo: Vec3, hi: Vec3): ImplicitLocalEvaluatorPresent on the accel: 'bvh' path (absent for the brute 'none' reference).

ImplicitLatticeOptions interface

interface ImplicitLatticeOptions
MemberDeclarationNotes
nodesnodes?: { sphere: number; }—
smoothKsmoothK?: number—
accelaccel?: 'bvh' | 'none'—
leafSizeleafSize?: number—
capscaps?: 'round' | 'flat'CADSF-2083: 'round' (default) capsules, or 'flat' -- cylinder()'s flat-capped solid in its own arithmetic (ops.latticeOracle 'sdf').
spheresspheres?: Array<{ c?: Vec3; p?: Vec3; r: number; }>CADSF-2083: extra balls, each with its own radius (p is accepted for c).

ImplicitGrid interface

mapGrid's dense sample (x fastest: index i + nx (j + ny k)).

interface ImplicitGrid extends Float32Array
MemberDeclarationNotes
dimsdims: [ number, number, number ]—
originorigin: Vec3—
hh: number—
atat: 'nodes' | 'centers'—
bboxbbox: ImplicitBox—

ImplicitSparseSampleOptions interface

ops.implicitGrid (CADSF-1765, IMPLICIT [2/8]): sparse narrow-band sampling, face-consistent marching cubes, manifold dual contouring and a mesh census. See ops/implicitGrid.js's header.

interface ImplicitSparseSampleOptions
MemberDeclarationNotes
hh: numberNode spacing (> 0).
bandband?: numberNarrow-band half-width (default 3h); must exceed L sqrt(3) h.
rootroot?: numberDense root blocks per axis (default 16).
bboxbbox?: ImplicitBoxSample over this box instead of field.bbox (required for an unbounded field).
clipclip?: booleanWith bbox: false keeps the raw field instead of field ∩ box (default true).
densedense?: booleantrue evaluates every node of every tile (no culls) -- the reference.
lipschitzlipschitz?: numberLipschitz constant for a field declaring neither bound nor exact.
maxTilesmaxTiles?: numberRefuse beyond this many kept tiles (default 2^18).
locallocal?: booleanCADSF-2083: false ignores field.localize (the per-point reference path).

ImplicitSparseGrid interface

sparseSample's grid: 8^3 tiles of Float32 node values, keyed tx + TX (ty + TY tz).

interface ImplicitSparseGrid
MemberDeclarationNotes
kindkind: 'implicitGrid'—
hh: number—
bandband: number—
lipschitzlipschitz: number—
originorigin: Vec3—
dimsdims: [ number, number, number ]—
tileDimstileDims: [ number, number, number ]—
tiletile: number—
tilestiles: Map<number, Float32Array>—
fieldfield: ImplicitFieldThe field actually sampled (field ∩ box when clipped).
clippedclipped: boolean—
densedense: boolean—
statsstats: { tiles: number; denseTiles: number; tileRatio: number; samples: number; denseSamples: number; evaluations: number; evalRatio: number; rootDims: [ number, number, number ]; rootLevel: number; blocksVisited: number; blocksCulled: number; ms: number; localTiles: number; localCandidates: number; }—

ImplicitExtractOptions interface

Options shared by marchingCubes() and dualContouring().

interface ImplicitExtractOptions
MemberDeclarationNotes
recordrecord?: booleanfalse skips the nested { vertices, faces } record (default true).
censuscensus?: booleanfalse skips the census (default true).
censusOptscensusOpts?: ImplicitCensusOptions—
normalsnormals?: booleanArea-weighted vertex normals as normalsFlat (and normals in the record).
ambiguityambiguity?: 'asymptotic' | 'cellMajority'Face decider: 'asymptotic' (default); 'cellMajority' is the deliberately broken test mode.

ImplicitDualContouringOptions interface

interface ImplicitDualContouringOptions extends ImplicitExtractOptions
MemberDeclarationNotes
hermitehermite?: booleanfalse keeps the linear crossing instead of refining it on the field (default true).
qefTruncationqefTruncation?: numberTruncated-SVD threshold (default 0.02).
rootIterationsrootIterations?: numberBisection steps refining a Hermite root (default 12; stops early inside 1e-7 h).
clampInsetclampInset?: numberPull-back of a clamped vertex, in h (default 0.02).
splitsplit?: 'shortest' | 'field'Which diagonal splits a quad into two triangles: 'shortest' (default, by edge length) or 'field' (by |f| at each diagonal's midpoint).
outsideoutside?: 'box' | 'clamp' | 'massPoint'Where a cell's QEF minimiser lies outside its cell: 'box' (default) -- the per-coordinate clamp pulled back by clampInset*h; 'clamp' -- the same rule, distinguished only for the (rare) shrunk-cell case; 'massPoint' -- use the Hermite mass point instead of clamping.
manifoldmanifold?: booleanfalse skips the non-manifold vertex-split post-pass (default true).
zeroSnapzeroSnap?: numberSnap a root to a grid node when the field there is within zeroSnap*h of 0 (default 1e-7; must be in [0, 0.01)).
foldRepairfoldRepair?: booleanfalse skips the post-manifold-repair fold-repair pass (default true).
ambiguityambiguity?: 'asymptotic' | 'cellMajority'Ambiguous-face resolution: 'asymptotic' (default) or the deliberately broken 'cellMajority' (kept for the test suite's own regression case).
locallocal?: booleanCADSF-2133: false ignores field.localize for the Hermite root refinement (the per-point reference path; the same mesh).

ImplicitDualContouringStats interface partly typed

dualContouring()'s mesh.stats shape (ImplicitMesh.stats is Record<string, any> for both extractors; this is what kind:'dualContouring' actually carries). Purely instrumentation -- nothing here is a knob.

interface ImplicitDualContouringStats
MemberDeclarationNotes
activeCellsactiveCells: number—
hermiteEdgeshermiteEdges: number—
fieldEvalsfieldEvals: number—
badNormalsbadNormals: number—
missingQuadCellsmissingQuadCells: number—
qefRankqefRank: { 0: number; plane: number; crease: number; corner: number; }—
clampedclamped: number—
cullViolationscullViolations: number—
ambiguityambiguity: 'asymptotic' | 'cellMajority'—
qefTruncationqefTruncation: number—
hermitehermite: boolean—
outsideoutside: 'box' | 'clamp' | 'massPoint'—
zeroSnapzeroSnap: number—
manifold loose 0.x typingmanifold: Record<string, any>manifoldRepair()'s own report; { skipped: true } when opts.manifold:false.
folds loose 0.x typingfolds: Record<string, any>foldRepair()'s own report; { skipped: true } when opts.foldRepair:false.
extractMsextractMs: number—
repairMsrepairMs: number—
foldMsfoldMs: number—
localTileslocalTiles: numberCADSF-2133: tiles whose Hermite roots were refined through field.localize, and their mean candidate count.
localCandidateslocalCandidates: number—
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

ImplicitCensusOptions interface

interface ImplicitCensusOptions
MemberDeclarationNotes
selfIntersectSamplesselfIntersectSamples?: number—

ImplicitMeshCensus interface partly typed

census(): measured, never assumed.

interface ImplicitMeshCensus
MemberDeclarationNotes
trianglestriangles: number—
verticesvertices: number—
edgesedges: number—
boundaryEdgesboundaryEdges: number—
nonManifoldEdgesnonManifoldEdges: number—
inconsistentEdgesinconsistentEdges: number—
closedclosed: boolean—
orientedoriented: boolean—
nonManifoldVerticesnonManifoldVertices: number—
manifoldmanifold: boolean—
componentscomponents: number—
eulereuler: number | nullV - E + F; null when not measured.
genusgenus: number | null(2C - chi) / 2 when closed, oriented and manifold; else null.
volumevolume: number—
areaarea: number—
minAngleDegminAngleDeg: number | null—
degenerateTrianglesdegenerateTriangles: number—
minEdgeLengthminEdgeLength: number | null—
weldTolweldTol: number | null—
weldSafeweldSafe: boolean | null—
selfIntersectionselfIntersection: { sampled: number; pairsTested: number; hits: number; examples: Array<[ number, number ]>; }—
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

ImplicitMesh interface partly typed

An extracted mesh: flat buffers plus (unless record:false) ops/meshHeal.js's shape.

interface ImplicitMesh
MemberDeclarationNotes
kindkind: 'marchingCubes' | 'dualContouring'—
positionspositions: Float64Array—
indicesindices: Uint32Array—
hh: number—
verticesvertices?: Vec3[]—
facesfaces?: Array<[ number, number, number ]>—
normalsnormals?: Vec3[]—
normalsFlatnormalsFlat?: Float64Array—
censuscensus?: ImplicitMeshCensus—
stats loose 0.x typingstats: Record<string, any>—

ImplicitMeasureOptions interface

ops.implicitMeasure (CADSF-1766, IMPLICIT [3/8]): volume / centroid / inertia by a narrow-band octree with exact marching tetrahedra, area from the DC mesh, exact containment. See ops/implicitMeasure.js's header.

interface ImplicitMeasureOptions
MemberDeclarationNotes
hh: numberLeaf cell edge (> 0).
bboxbbox?: ImplicitBoxIntegrate over this box (clips the solid to it unless clip:false).
clipclip?: boolean—
lipschitzlipschitz?: number—
maxCellsmaxCells?: numberRefuse an octree root wider than this many cells per axis (default 2^22).
locallocal?: booleanCADSF-2083: false ignores field.localize (the per-point reference path).
cornerCachecornerCache?: booleanCADSF-2133: false disables the per-block leaf-corner cache (the uncached reference; the same volume and moments, more evaluations).

ImplicitVolumeResult interface

interface ImplicitVolumeResult
MemberDeclarationNotes
volumevolume: number—
msms: number—
evaluationsevaluations: number—
leafCellsleafCells: number—
bulkCellsbulkCells: number—
hh: number—
localBlockslocalBlocks: numberOctree blocks evaluated through field.localize, and their mean candidate count.
localCandidateslocalCandidates: number—
cornerCacheHitscornerCacheHits: numberCADSF-2133: leaf corners served from the per-block cache (evaluations saved).

ImplicitRichardsonOptions interface

interface ImplicitRichardsonOptions extends ImplicitMeasureOptions
MemberDeclarationNotes
ratioratio?: numberCoarse/fine step ratio (default 2).
orderorder?: numberAssumed leading error order (default 2).

ImplicitRichardsonResult interface

interface ImplicitRichardsonResult
MemberDeclarationNotes
valuevalue: number—
errorEstimateerrorEstimate: number|value - volume(h)|: the size of the correction itself.
hh: number—
coarseHcoarseH: number—
orderorder: number—
finefine: ImplicitVolumeResult—
coarsecoarse: ImplicitVolumeResult—
msms: number—

ImplicitAreaOptions interface partly typed

interface ImplicitAreaOptions
MemberDeclarationNotes
hh?: number—
bandband?: number—
mesh partly typedmesh?: { census: ImplicitMeshCensus; [key: string]: any; }Reuse an extraction: its census is read directly.
dcOptsdcOpts?: ImplicitDualContouringOptions—
bboxbbox?: ImplicitBox—
lipschitzlipschitz?: number—
clipclip?: boolean—

LatticeCellType type

ops.latticeCell / ops.latticeOracle (CADSF-1738, LATTICE [2/9]): periodic unit-cell strut lattices and the Sobol Monte-Carlo oracle that validates them against closed forms. See ops/latticeCell.js and ops/latticeOracle.js's headers for the basis + connectivity-rule engine, the JUNGLEGYM T-joint trim, and the ray-scaled pairwiseSteinmetz correction.

type LatticeCellType = 'SC' | 'BCC' | 'BCCZ' | 'FCC' | 'FCCZ' | 'OCTET' | 'DIAMOND' | 'KELVIN' | 'JUNGLEGYM';

LatticeStrutFamily type

'axis': 1 nonzero displacement component, 'rung': 2, 'diag': 3 -- computed from the generated geometry, not looked up per cell. For JUNGLEGYM the three grid axes (x,y,z) are fixed to 'axis','diag','rung' respectively (JG_FAMILY_BY_AXIS); 'axis' is the convention's "host" (thickest) family.

type LatticeStrutFamily = 'axis' | 'rung' | 'diag';

LatticeRadii type

A flat per-family radius map (with axis as the fallback for any family it does not name) or a function of the strut being resolved.

type LatticeRadii = Partial<Record<LatticeStrutFamily, number>> | ((strut: {
    family: LatticeStrutFamily;
    axis?: number;
    p0: Vec3;
    p1: Vec3;
}) => number);

LatticeStrut interface partly typed

interface LatticeStrut extends ImplicitStrut
MemberDeclarationNotes
familyfamily: LatticeStrutFamily—
cellIndexcellIndex: numberIndex into this call's own strut array (stable for a given opts/seed).
axisaxis?: numberJUNGLEGYM only: which grid axis (0=x,1=y,2=z) this strut runs along.
section loose 0.x typingsection?: Record<string, any>Present only when opts.hollow was given: ops/tubeMember.js's resolveSection() record.

LatticeNode interface

interface LatticeNode
MemberDeclarationNotes
pp: Vec3—
valencevalence: numberStrut-endpoint count at this node.
rr?: numberOnly present when opts.nodes.sphere > 0 (every node gets that same radius).

LatticeCellOptions interface

interface LatticeCellOptions
MemberDeclarationNotes
cellcell: LatticeCellType—
aa: numberUnit-cell edge length (> 0).
gridgrid: number | [ number, number, number ]Tiling extent: a single count (cubed) or [nx, ny, nz], each an integer >= 1.
radiiradii: LatticeRadiiPer-family (JUNGLEGYM: per grid-axis) strut radius. Required.
clipclip?: 'nodes' | 'bbox''nodes' (default): basis points are clipped at node granularity, struts may bulge past the grid box by their radius. 'bbox' (CADSF-2092): the part is lattice ∩ grid box -- each strut (and bore) is cut EXACTLY to the part of its axis whose cross-section disc still reaches the box; struts that do not reach it are dropped and genus/valence recomputed. See {@link LatticeCellResult.clip}.
nodesnodes?: { sphere: number; }Adds a sphere radius (the same value on every node), consumed by ops/implicit.js's lattice() and ops/latticeOracle.js.
jitterjitter?: numberDeterministic per-node position jitter, as a fraction of a.
seedseed?: numbermulberry32 seed for jitter (default 1; has no effect when jitter is 0).
hollowhollow?: { wall: number; bore?: boolean | 'drilled' | 'blind'; }Wraps every strut's round cross-section via ops/tubeMember.js's resolveSection({ shape: 'round', od: 2r, wall }). CADSF-2092: bore ALSO emits bores, one coaxial bore strut per strut running node to node (radius = od/2 - wall); true and 'drilled' mean the same thing (every channel connected through every node), 'blind' seals each tube's wall from the others'. See {@link LatticeCellResult.bores}.
mergeCollinearmergeCollinear?: boolean | { tol?: number; }CADSF-1740/2092: joins collinear equal-radius strut chains (butted cap to cap) into single bars (and, when hollow.bore is set, boreBars over bores). tol overrides the default snap tolerance. See {@link LatticeCellResult.bars}.
tTrimtTrim?: 'surface' | 'wall' | { mode: 'surface' | 'wall'; overlap?: number; }JUNGLEGYM only (CADSF-2092): how a thinner dangling member ends on its thicker through host. 'surface' (default): the flat cap is TANGENT to the host cylinder along a line (non-manifold T). 'wall' (or { mode: 'wall', overlap }): buries the cap inside the host wall, overlap default 0.1 * r (must be > 0 when given explicitly). Passing either mode explicitly reports every trimmed end in tJoints. See {@link LatticeCellResult.tJoints}.

LatticeCellResult interface partly typed

interface LatticeCellResult
MemberDeclarationNotes
strutsstruts: LatticeStrut[]—
nodesnodes: LatticeNode[]—
genusgenus: numberCycle rank (first Betti number) of the strut graph: struts - nodes + components. Reduces to the ticket's own "s - n + 1" whenever the graph is a single connected piece (every cell/grid size except small DIAMOND, which can have isolated boundary atoms -- see tests/test_lattice_cell.js).
componentscomponents: number—
expectedCountsexpectedCounts: { nodes: number; struts: number; }The exact closed-form node/strut counts this generator is pinned against (derived and hand-verified in tests/test_lattice_cell.js).
bboxbbox: ImplicitBox—
arches partly typedarches?: Array<Record<string, any>>JUNGLEGYM only: per-arch metadata; not consumed by ops/implicit.js or ops/latticeOracle.js.
boresbores?: Array<LatticeStrut & { strut: number; }>opts.hollow.bore only (CADSF-2092): one coaxial bore strut per strut, node to node (for JUNGLEGYM the untrimmed segment, so a trimmed branch's bore still reaches the host's bore). strut indexes this result's own struts array. ops/latticeOracle.js subtracts these (mc and sdf) per boreMode.
boreModeboreMode?: 'drilled' | 'blind'opts.hollow.bore only: 'drilled' (U outer) - (U bores), every channel connected through every node; 'blind' U (outer_i - bore_i), each tube's wall sealing the others' bores.
barsbars?: Array<{ p0: Vec3; p1: Vec3; r: number; family: LatticeStrutFamily; members: number[]; }>opts.mergeCollinear only (CADSF-1740): straight runs of butted equal- radius struts merged into one bar each, members the merged struts' indices into struts.
boreBarsboreBars?: Array<{ p0: Vec3; p1: Vec3; r: number; family: LatticeStrutFamily; members: number[]; }>opts.mergeCollinear with opts.hollow.bore: the same merge over bores.
clipclip?: { mode: 'bbox'; box: ImplicitBox; trimmed: number; dropped: number; cut: number; sphereCut: number; intersect: boolean; bores?: { trimmed: number; dropped: number; cut: number; }; }opts.clip:'bbox' only (CADSF-2092): the grid-box clip actually applied. cut/sphereCut count struts (or node spheres) whose cross-section still crosses a box face -- intersect:true means the consumer must still intersect the published solid with box (ops/latticeOracle.js does this itself; a B-rep union does BOOL.intersect(union, box)).
tJointstJoints?: Array<{ strut: number; end: 0 | 1; node: Vec3; hostAxis: Vec3; hostR: number; r: number; depth: number; clearance: number; contact: 'line' | 'buried'; }>Present only when opts.tTrim was passed explicitly (JUNGLEGYM): one entry per trimmed dangling-member end. clearance is the cap rim's radial clearance inside the host (R - sqrt(r^2 + depth^2)); contact is 'line' at clearance 0 (opts.tTrim:'surface') or 'buried'.

LatticeOracleSphere interface

A node sphere as ops/latticeOracle.js's internals see it (center c, not p -- distinct from {@link LatticeNode}, which it is built from).

interface LatticeOracleSphere
MemberDeclarationNotes
cc: Vec3—
rr: number—

LatticeOracleOptions interface

interface LatticeOracleOptions
MemberDeclarationNotes
NN?: numberTarget total sample count (default 1e7 -- the ticket's own acceptance number).
repsreps?: numberIndependent replicates via Cranley-Patterson shifts of the same Sobol sequence; sigma is their standard error of the mean (default 8).
seedseed?: numbermulberry32 seed for the replicate shifts; deterministic.
boxbox?: ImplicitBoxOverrides the sampling box (default: the strut/sphere bounding box, padded by each radius).
backendbackend?: 'mc' | 'sdf''mc' (default): the Sobol estimator. 'sdf' (CADSF-1766): ops.implicitMeasure volumeRichardson over the same flat-capped union, BVH-accelerated (CADSF-2083).
hh?: number'sdf' only: leaf cell edge (default ops.latticeOracle.autoH(): the smallest radius / 20).
accelaccel?: 'bvh' | 'none''bvh' (default) or the brute reference 'none'. CADSF-2092: for 'mc' this is a uniform-cell sample index (opts.cellsPerItem sizes it) that tests only a sample's own cell instead of every strut/sphere, bit-identical to 'none'; for 'sdf' it is ops.implicit.lattice()'s own BoxBvh (CADSF-2083).
cellsPerItemcellsPerItem?: number'mc' + accel:'bvh' only (CADSF-2092, default 8): sizes the sample index's uniform cell grid (budget = cellsPerItem * item count, capped at 2^18 cells). See {@link LatticeOracleResult.index}.
boresbores?: Array<{ p0: Vec3; p1: Vec3; r: number; strut?: number; }> | falseCADSF-2092: hollow bores to subtract, overriding input.bores (ops/latticeCell.js's hollow.bore output); false ignores input.bores. mc and sdf both honour it; autoH also sees bore radii/wall.
boreModeboreMode?: 'drilled' | 'blind'CADSF-2092: 'drilled' (default when bores are present) (U outer U spheres) - (U bores); 'blind' spheres U U_i (outer_i - bore_{strut=i}) -- 'blind' bores must name their strut (bore.strut) or match the struts one for one. Overrides input.boreMode.
clipclip?: ImplicitBox | falseCADSF-2092: measure (the union above) ∩ clip, overriding input.clip.box (ops/latticeCell.js clip:'bbox' output); false ignores it. mc samples box ∩ clip; sdf measures field ∩ box(clip). pairwiseSteinmetz is null under a clip (and under 'blind' bores).

LatticeOracleResult interface

interface LatticeOracleResult
MemberDeclarationNotes
volumevolume: number—
sigmasigma: numberStandard error of the mean across reps replicates.
NN: numberActual total sample count used (perRep * reps, nearest to the requested N).
upperBoundupperBound: numberΣπR²L (cylinders) + Σ(4/3)πr³ (node spheres): ignores all overlap, so this is always >= volume.
pairwiseSteinmetzpairwiseSteinmetz: numberA second, cheaper closed-form ESTIMATE valid for orthogonal equal- radius lattices: upperBound minus a per-node Steinmetz/tricylinder correction, scaled by each incident ray's "through strength" (1 = dangling ray, 2 = fully through the node). Not a bound -- can land on either side of volume.
backendbackend: 'mc' | 'sdf'—
hh?: number'sdf' only: the leaf cell edge used, the wall time and the Richardson record.
msms?: number—
richardsonrichardson?: ImplicitRichardsonResult—
accelaccel?: 'bvh' | 'none'Present once opts.accel, opts.bores or opts.clip (or their input equivalents) are in play (CADSF-2092); an unextended call omits every field below, byte for byte as before CADSF-2092.
boxbox?: ImplicitBoxThe sampling box actually used (after any clip intersection).
indexindex?: LatticeOracleIndexStats'mc' + accel:'bvh' only: the sample index actually built. See {@link LatticeOracleIndexStats}.
boresbores?: { count: number; mode: 'drilled' | 'blind'; }Present when bores were supplied (input or opts).
clipclip?: ImplicitBoxPresent when a clip box was supplied (input or opts): the box measured against.

LatticeOracleIndexStats interface

ops.latticeOracle's CADSF-2092 sample index (mc + accel:'bvh' only): a uniform cell grid over the sampling box, one BoxBvh.overlapping() query per cell at build time. perCell is entries / cells; testsPerSample is the measured mean list length actually scanned per Sobol sample (instrumentation, not a knob). bores is the drilled bore list's own grid, same box and dims.

interface LatticeOracleIndexStats
MemberDeclarationNotes
dimsdims: [ number, number, number ]—
cellscells: number—
entriesentries: number—
perCellperCell: number—
testsPerSampletestsPerSample: number—
boresbores?: { dims: [ number, number, number ]; entries: number; }—

BodyResult interface partly typed

What every body-building op returns: the (fresh or shared) parser that owns the entity graph and the MANIFOLD_SOLID_BREP id inside it. builder is the ops/primitives.js Builder that authored the graph; analytic carries closed-form figures (volume, sweep angle) for cross-checking the mesh.

interface BodyResult
MemberDeclarationNotes
parserparser: StepParser—
solidIdsolidId: number—
builder loose 0.x typingbuilder?: any—
analytic partly typedanalytic?: { volume?: number | null; [key: string]: any; }—

EditResult interface partly typed

Result of an op that edits a body IN PLACE in its parser: the new solid id (the input solid is left intact; callers may retire it).

interface EditResult
MemberDeclarationNotes
solidIdsolidId: number—
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

EdgeReportEntry interface partly typed

Per-edge outcome of a dress-up op (blend / chamfer routers).

interface EdgeReportEntry
MemberDeclarationNotes
edgeIdedgeId: number—
statusstatus: 'blended' | 'chamfered' | 'skipped' | 'refused' | string—
reasonreason?: string—
reasonCodereasonCode?: string—
groupgroup?: number—
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

DressUpResult interface

interface DressUpResult extends EditResult
MemberDeclarationNotes
facesfaces?: { trimmed: number; strips?: number; chamfers?: number; corners: number; }Face census of the new shell (trimmed originals, new strips/facets, corner patches).
edgeReportedgeReport?: EdgeReportEntry[]Present on the selection routers (blendEdges, chamferEdges).
methodmethod?: string—

BlendSpec type

Fillet radius law: constant radius, or the symmetric quadratic corner→mid→corner profile along each edge (the dice case).

type BlendSpec = {
    radius: number;
} | {
    corner: number;
    mid: number;
};

ChamferSpec interface partly typed

Chamfer setback: the facet sits distance inside BOTH adjacent faces (a 45° chamfer when they are perpendicular).

interface ChamferSpec
MemberDeclarationNotes
distancedistance: number—
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

DressUpOptions interface partly typed

interface DressUpOptions
MemberDeclarationNotes
edgesedges?: number[]EDGE_CURVE ids to dress up; omitted on the *ConvexEdges / router entry points means EVERY convex edge of a convex planar-faced solid.
costModelcostModel?: booleanCADSF-552 opt-in cost reporting (also CADSOLVER_COST_MODEL=1).
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

PatternOptions interface partly typed

interface PatternOptions
MemberDeclarationNotes
modemode?: 'cut' | 'add''cut' (default, boolean subtract) or 'add' (union) each instance into the base.
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

PatternResult interface

interface PatternResult extends EditResult
MemberDeclarationNotes
instancesinstances: numberInstances actually applied (count includes the seed at i = 0).
retiredretired: numberSuperseded intermediate solids retired from the parser (CADSF-980).

HoleSpec interface partly typed

interface HoleSpec
MemberDeclarationNotes
typetype?: 'drill' | 'tapped' | 'counterbore' | 'countersink'—
centercenter?: Vec2Hole centre on the top face (axis −Z into the material) — or use axis + start.
throughthrough?: booleanBore the whole depth (default) …
depthdepth?: number… or a blind depth in mm measured from the mouth.
sizesize?: stringThread / fastener size, e.g. 'M8' (tapped, counterbore, countersink).
diameterdiameter?: numberPlain drill Ø in mm (instead of size).
counterbore partly typedcounterbore?: { diameter?: number; depth?: number; [key: string]: any; }—
countersink partly typedcountersink?: { diameter?: number; angle?: number; [key: string]: any; }—
fitfit?: stringTapped callout class, e.g. '6H'.
axisaxis?: Vec3CADSF-582: drilling DIRECTION into the material; requires start, excludes center.
startstart?: Vec3With axis: the mouth centre, a point on the hole axis where the drill enters.
toolMatchtoolMatch?: 'warn' | 'snap' | false | { mode?: string; inventory?: unknown; policy?: string; tolerance?: number; }CADSF-636: match the drilled Ø against a stocked drill inventory.
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

HoleResult interface partly typed

interface HoleResult extends BodyResult
MemberDeclarationNotes
feature loose 0.x typingfeature: Record<string, any>The recognised hole feature (callout, dimensions, tool match).

feature operations (ops.*) · 7

MeshToBrepOrientResult interface

CADSB-1415: ops/meshToBrep.js's own shell-orientation repair -- a route-M (mixed/faceted) solid can sew CLOSED with a shared edge walked the SAME way by both its faces (checkLocal's inconsistent_face_orientation / loop-edge-use-inconsistent); this flips FACE_BOUND orientation flags on whole connected sets of loops (never a single loop) to make every shared edge opposite, or says why it could not. Pure B-rep surgery; never intersects, never adds/removes a face. See ops/meshToBrep.js's header.

interface MeshToBrepOrientResult
MemberDeclarationNotes
okok: boolean—
inconsistentEdgesinconsistentEdges: numbershellSenseCensus()'s own count, before any repair.
loopsloops: number—
reversedreversed: number[]FACE_BOUND ids actually reversed (empty when already ok, or when declined).
facesfaces: number[]Face ids touched by a reversed loop (may repeat a loop reversal per face).
tiesties: numberIndependent components whose majority vote was tied both ways: no orientation to keep.
conflictsconflicts: numberComponents where the loop graph is an odd cycle: no reversal set makes every edge opposite.
checkLocalcheckLocal: { findings: number; codes: string[]; } | nullRe-measured after a repair attempt; null when nothing was attempted (already ok, or declined).
whywhy?: stringPresent iff !ok: why (an odd cycle, a tie, or checkLocal still unhappy after reversing).

MeshToBrepShellSenseCensus interface

ops/meshToBrep.js's raw per-edge orientation reading of one solid's shell: uses maps an edge id to every FACE_BOUND that walks it, with the sense (true/false) it walks it in; an edge used twice with the SAME sense is inconsistent. Pure reading, no mutation.

interface MeshToBrepShellSenseCensus
MemberDeclarationNotes
boundsbounds: Array<{ id: number; faceId: number; outer: boolean; plane: boolean; }>—
usesuses: Record<number, Array<{ b: number; sense: boolean; }>>A real Map at runtime (edge id -> its uses); typed as a Record here only because this file's tsc check has no Map lib available.
inconsistentinconsistent: number—

MeshToBrepLoopWinding interface partly typed

CADSB-1435 / CADSF-2867: how route M decided every loop's direction (summary.loopWinding). mode 'halfEdge' reads the mesh's own winding; 'chart' is the pre-ticket (u,v) area-sign rule.

interface MeshToBrepLoopWinding
MemberDeclarationNotes
modemode: 'halfEdge' | 'chart'—
loopsloops: number—
byHalfEdgebyHalfEdge: number—
byChartbyChart: number—
chartDisagreeschartDisagrees: number—
splitVotessplitVotes: number—
meshConflictsmeshConflicts: number—
disagreements partly typeddisagreements: any[]—

MeshToBrepSliver interface partly typed

One degenerate region dropped as a sliver (summary.slivers[]).

interface MeshToBrepSliver
MemberDeclarationNotes
regionregion: number—
kindkind: string—
trianglestriangles: number—
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

MeshToBrepIslandSplit interface

CADSF-2867: a region split into islands edge-connected pieces (summary.islandSplits[]; region is the pre-split index).

interface MeshToBrepIslandSplit
MemberDeclarationNotes
regionregion: number—
islandsislands: number—

MeshToBrepRouteMSummary interface partly typed

Route M's report summary (ops/meshToBrep.js graftCandidate), the fields CADSF-2867 surfaces; the rest is read through the index signature.

interface MeshToBrepRouteMSummary
MemberDeclarationNotes
facesfaces: number—
regionsregions: number—
loopWindingloopWinding: MeshToBrepLoopWinding | null—
sliversslivers: MeshToBrepSliver[]—
islandSplitsislandSplits: MeshToBrepIslandSplit[]—
[key: string] loose 0.x typing[key: string]: anyOpen shape: a plain data object with no runtime class behind it. The keys above are the typed contract; the index signature allows further keys, typed any, that this reference does not list.

ops namespace

MemberDeclarationNotes
primitivesops.primitives · 8 membersAnalytic primitives on a fresh StepParser. origin is the min-corner (box) or base centre (cylinder / cone / frustum / sphere / torus).
polyhedraops.polyhedra · 9 membersRegular / semi-regular polyhedra of circumradius R, plus a general vertex/face-list constructor.
extrudeops.extrude · 11 membersPlanar sketch profile → prism.
revolveops.revolve · 6 membersCADSF-159: solid of revolution from a closed r-z profile about +Z.
loftops.loft · 22 membersRuled (2-section) and cubic (≥3-section) lofts through closed planar profiles, each in its own z = const plane.
shellops.shell · 2 membersCADSF-160: shell / hollow to a wall thickness, leaving openFaceIds open.
offsetops.offset · 5 membersGeneral robust body offset (CADSF-262): uniform (distance) or per-face variable (opts.faceDistances) — see ops/offset.js's header for the sign convention and the local/convexTrim construction paths.
holesops.holes · 14 membersManufacturing holes (drill / tapped / counterbore / countersink) cut into a body, with the ISO thread, tap-drill and clearance tables.
blendops.blend · 33 membersEdge fillets (rolling-ball blends). The result is a NEW solid in the same parser; every refusal is named (.reasonCode).
chamferops.chamfer · 17 membersEdge chamfers — the flat twin of blend, same selection routes.
booleanops.boolean · 43 membersBooleans. subtract / union / intersect take the exact pierce fast path where its hypothesis holds and the general classify-and- stitch engine otherwise; the result is a NEW solid, inputs untouched. CADSF-236 adds the ACIS-style selective boolean (cell decomposition).
boxBool loose 0.x typingboxBool: Record<string, any>—
genBool loose 0.x typinggenBool: Record<string, any>—
surgeryops.surgery · 21 membersFace-level surgery: delete-and-cap, split by plane, push/pull.
moveFaceops.moveFace · 13 membersDirect edit (CADSF-537 wiring). moveFace applies a rigid motion (translate / offset along the face normal / rotate) to one PLANAR face and regenerates its neighbours; canMoveFace answers the same question read-only. See ops/moveFace.js's header.
moveFaceCylinderops.moveFaceCylinder · 5 membersDirect edit, CYLINDRICAL faces (CADSF-1062). offset is a RADIUS delta (resize a bore, grow a boss) and translate shifts a whole cylinder; the rims are re-fitted and the planar/coaxial neighbours re-trimmed. Reached automatically through moveFace.moveFace on a cylindrical pick. See ops/moveFaceCylinder.js's header.
moveFaceConeops.moveFaceCone · 5 membersCADSF-2169: the CONICAL half of move face — offset resizes with the semi-angle kept (R' = R + d / cos α), translate slides it along its axis. Reached automatically through moveFace.moveFace on a conical pick.
moveFaceSphereops.moveFaceSphere · 5 membersCADSF-2169: the SPHERICAL half of move face — offset resizes (R' = R + d), translate shifts the centre. Reached automatically through moveFace.moveFace on a spherical pick.
healFaceops.healFace · 4 membersDelete a face and HEAL the wound by extending the faces around it (CADSF-255), rather than re-capping it with a copy of itself — also reachable as ops.surgery.deleteFaceAndCap(p, s, f, { heal: true }). See ops/healFace.js's header.
draftops.draft · 8 membersMould draft / taper on a PLANAR-faced solid about a neutral plane (CADSF-259). See ops/draft.js's header for the v1 scope.
featureRecognitionops.featureRecognition · 7 membersRead-only feature recognition over a finished body (CADSF-257): holes, pockets, bosses, fillets and chamfers off the face-adjacency graph, each with a confidence.
defeatureops.defeature · 4 membersRecognition-driven defeaturing (CADSF-780): remove recognized holes/bosses/fillets/chamfers under per-class size thresholds, each wound healed by ops/healFace. Confident features only; refusals reported by name in the result's skipped[].
blendRecognitionops.blendRecognition · 4 membersB-rep blend-NETWORK recognition (CADSF-1623): edge blends, vertex blends (sphere/torus corner patches) and cliff blends, grouped into connected clusters, each with a confidence. Read-only.
blendSuppressops.blendSuppress · 6 membersBlend suppression by network (CADSF-1623): every confident cluster under maxRadius (or containing the given faces) is removed and its sharp edges/corners solved from the planar supports; ops/check-gated, with a validity + mass-property comparison in verification.
standardPartsops.standardParts · 14 membersRead-only standard-part recognition (hex bolt / bearing ring / dowel pin) against the published dimension tables.
eligibilityops.eligibility · 13 membersWhich bodies an operator can run on at all (CADSF-463) — the selection filter behind the operator dialogs' body picker.
transformops.transform · 23 membersRigid transforms and body-level copies. Clone ops return the NEW solid id; the original stays in the parser.
patternsops.patterns · 8 membersCADSF-163 FEATURE-level patterns: N tool instances boolean-cut (or -added) into the base, producing ONE watertight solid. count includes the seed instance at i = 0.
rectUnion loose 0.x typingrectUnion: Record<string, any>—
polygonBooleanops.polygonBoolean · 48 membersCADSF-1748 (PCB [3/10]): 2-D polygon booleans that return polygons. Rings are [[x,y],...] (implicitly closed); results are outer-CCW / holes-CW polygons on a grid of resolution mm (default 1 nm).
pcbSolidsops.pcbSolids · 43 membersCADSF-1749 (PCB [4/10]): the LAYOUT MODEL (docs/PCB_LAYOUT_MODEL.md) as tagged 2.5D solids - one prism per copper island, via barrels, embedded or conformal dielectric. Bodies carry {kind, layer, net, z0, z1, thickness, material, epsilon_r, loss_tangent}; the report has per-layer timings, island/hole counts, the Σ A·t volume audit and checkLocal per body.
pcbImportops.pcbImport · 19 membersCADSF-1750 (PCB [5/10]): a PCB layout file -> named, tagged, coloured pcbSolids bodies; the function import mode "pcb" and cad_import call.
exactPredicatesops.exactPredicates · 15 membersCADSF-1628: Shewchuk's adaptive-precision exact geometric predicates ("Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates", Discrete & Computational Geometry 18(3), 1997; the reference C is public domain). Each returns a number whose SIGN is the sign of the exact determinant for ANY double inputs - no epsilon, no perturbation, no assumption about scale. Use the sign; the magnitude is the filtered floating-point value, not an area.
implicitops.implicit · 24 membersCADSF-1764 (IMPLICIT [1/8]): the signed-distance field layer. Pure functions over {@link ImplicitField}. Primitives are exact; union is exact outside, intersect / subtract exact inside, smooth ops and TPMS are 1-Lipschitz bounds. See ops/implicit.js's header.
implicitGridops.implicitGrid · 7 membersCADSF-1765 (IMPLICIT [2/8]): a field becomes a surface again -- sparse narrow-band sampling (Lipschitz cull, band > sqrt(3) h), face-consistent marching cubes, manifold dual contouring, and a measuring census. Uses {@link ImplicitField.localize} per tile when the field has it (CADSF-2083). See ops/implicitGrid.js's header.
implicitMeasureops.implicitMeasure · 7 membersCADSF-1766 (IMPLICIT [3/8]): mass properties, containment and oracles from a field -- volume / centroid / inertia by an independent narrow- band octree (exact marching tetrahedra per leaf, closed-form bulk blocks), Richardson extrapolation, area from the DC mesh, exact inside(). Uses {@link ImplicitField.localize} per 8^3 block when the field has it (CADSF-2083). See ops/implicitMeasure.js's header.
latticeCellops.latticeCell · 2 membersCADSF-1738 (LATTICE [2/9]): periodic unit-cell strut generator (SC, BCC(Z), FCC(Z), OCTET, DIAMOND, KELVIN, JUNGLEGYM) built on one basis- point + connectivity-rule engine. Its struts feed ops.implicit.lattice() directly. See ops/latticeCell.js's header.
latticeOracleops.latticeOracle · 11 membersCADSF-1738 (LATTICE [2/9]): a dependency-free Sobol Monte-Carlo union- of-cylinders (and node-sphere) volume oracle, used to validate ops.latticeCell (or any other strut set) against closed forms. See ops/latticeOracle.js's header.
datum loose 0.x typingdatum: Record<string, any>—
gear loose 0.x typinggear: Record<string, any>—
dicePips loose 0.x typingdicePips: Record<string, any>—
check loose 0.x typingcheck: Record<string, any>—
dfmRules loose 0.x typingdfmRules: Record<string, any>DFM rule packs per process (OSHCut / SendCutSend / … catalogues).
tubeMember loose 0.x typingtubeMember: Record<string, any>Rectangular / round tube members with the tube-laser DFM check.
toleranceStack loose 0.x typingtoleranceStack: Record<string, any>Worst-case / RSS / Monte-Carlo tolerance stacks.
meshCrossCheck loose 0.x typingmeshCrossCheck: Record<string, any>Analytic-vs-mesh volume cross-check with the chord-sag bound.
provenance loose 0.x typingprovenance: Record<string, any>—

ops.primitives namespace

Analytic primitives on a fresh StepParser. origin is the min-corner (box) or base centre (cylinder / cone / frustum / sphere / torus).

MemberDeclarationNotes
boxbox(dx: number, dy: number, dz: number, origin?: Vec3): BodyResult—
cylindercylinder(r: number, h: number, origin?: Vec3): BodyResult—
conecone(r: number, h: number, origin?: Vec3): BodyResultCone to an apex.
frustumfrustum(r0: number, r1: number, h: number, origin?: Vec3): BodyResultTruncated cone between radii r0 (base) and r1 (top).
spheresphere(r: number, origin?: Vec3): BodyResult—
torustorus(R: number, rmin: number, origin?: Vec3): BodyResultMajor radius R, tube radius rmin, about +Z.
steppedRevolvesteppedRevolve(profile: Vec2[], origin?: Vec3): BodyResultCADSF-224: stepped solid of revolution from an outer silhouette [r, z] ordered bottom → top (cylindrical / conical bands, annular shoulders) — one exact cutting tool for counterbores and countersinks.
Builder loose 0.x typingBuilder: anyThe low-level STEP entity-graph builder the primitives author with.

ops.polyhedra namespace

Regular / semi-regular polyhedra of circumradius R, plus a general vertex/face-list constructor.

MemberDeclarationNotes
polyhedron partly typedpolyhedron(verts: Vec3[], faces: number[][], opts?: Record<string, any>): BodyResult—
tetrahedrontetrahedron(R?: number, origin?: Vec3): BodyResult—
hexahedronhexahedron(R?: number, origin?: Vec3): BodyResult—
octahedronoctahedron(R?: number, origin?: Vec3): BodyResult—
dodecahedrondodecahedron(R?: number, origin?: Vec3): BodyResult—
icosahedronicosahedron(R?: number, origin?: Vec3): BodyResult—
trapezohedron10trapezohedron10(R?: number, origin?: Vec3): BodyResult—
triangleFaces loose 0.x typingtriangleFaces(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.extrude namespace

Planar sketch profile → prism.

MemberDeclarationNotes
extrude partly typedextrude(outer: Profile2D, depth: number, opts?: { holes?: Profile2D[]; plane?: SketchPlane; costModel?: boolean; [key: string]: any; }): BodyResultSweep a CCW outer polygon (with optional CW holes) depth along the sketch plane's normal. No plane = world XY / +Z.
extrudeArcProfile partly typedextrudeArcProfile(profile: { pts: Profile2D; arcs?: Array<{ seg: number; center: Vec2; ccw?: boolean; }>; holes?: any[]; [key: string]: any; } | any, depth: number, opts?: Record<string, any>): BodyResultExtrude a profile whose segments may be circular arcs (profile.arcs: [{ seg, center, ccw? }]).
shoelaceshoelace(poly: Profile2D): numberSigned area of a 2D polygon (+ve = CCW).
arcLoop loose 0.x typingarcLoop(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
arcLoopMoments loose 0.x typingarcLoopMoments(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
ellipseArcNurbs loose 0.x typingellipseArcNurbs(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
planeFrame loose 0.x typingplaneFrame(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
profileLoopConflict loose 0.x typingprofileLoopConflict(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
profileLoopConflictError loose 0.x typingprofileLoopConflictError(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
revolve loose 0.x typingrevolve(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.revolve namespace

CADSF-159: solid of revolution from a closed r-z profile about +Z.

MemberDeclarationNotes
revolve partly typedrevolve(profile: Vec2[], opts?: { angle?: number; arcs?: Array<{ seg: number; center: Vec2; ccw?: boolean; }>; splines?: any[]; [key: string]: any; }): BodyResult & { analytic: { volume: number; angle: number; }; }angle in radians, (0, 2π], default 2π. arcs marks profile segments as circular arcs ({ seg, center:[cr,cz], ccw? }).
normalizeProfile loose 0.x typingnormalizeProfile(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
revolveSpecFromExactLoop loose 0.x typingrevolveSpecFromExactLoop(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
segmentSurface loose 0.x typingsegmentSurface(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
shellIntegral loose 0.x typingshellIntegral(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.loft namespace

Ruled (2-section) and cubic (≥3-section) lofts through closed planar profiles, each in its own z = const plane.

MemberDeclarationNotes
loft partly typedloft(a: Profile2D | Array<{ pts: Profile2D; z: number; }> | Profile2D[], b?: Profile2D | Record<string, any>, opts?: Record<string, any>): BodyResultDispatcher: loft(profileA, profileB, opts) (ruled) or loft(sections, opts) with sections = [{ pts, z }, …] (cubic).
loftRuled partly typedloftRuled(profileA: Profile2D, profileB: Profile2D, opts?: { zA?: number; zB?: number; align?: boolean; [key: string]: any; }): BodyResult—
loftCubic partly typedloftCubic(sections: Array<{ pts: Profile2D; z: number; }> | Profile2D[], opts?: { zs?: number[]; align?: boolean; [key: string]: any; }): BodyResult—
REASON_CODESREASON_CODES: Record<string, string>—
area3 loose 0.x typingarea3(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
bandDeviation loose 0.x typingbandDeviation(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
bcurve loose 0.x typingbcurve(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
bestPhase loose 0.x typingbestPhase(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
bezierSegmentsFromCubic loose 0.x typingbezierSegmentsFromCubic(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
bsurf loose 0.x typingbsurf(...args: any[]): anyRuntime method taking 6 declared parameters; present on the shipped object, signature not typed.
correspondByArcLength loose 0.x typingcorrespondByArcLength(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
correspondSections loose 0.x typingcorrespondSections(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
edgeOutward loose 0.x typingedgeOutward(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
evalGlobalSpline loose 0.x typingevalGlobalSpline(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
interpCubic loose 0.x typinginterpCubic(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
knots loose 0.x typingknots(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
newell loose 0.x typingnewell(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
pointAtParam loose 0.x typingpointAtParam(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
polyParams loose 0.x typingpolyParams(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
shoelace2 loose 0.x typingshoelace2(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
solveLinear loose 0.x typingsolveLinear(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.shell namespace

CADSF-160: shell / hollow to a wall thickness, leaving openFaceIds open.

MemberDeclarationNotes
shellSolid partly typedshellSolid(parser: StepParser, solidId: number, thickness: number, openFaceIds?: number[], opts?: Record<string, any>): EditResult & { analytic: { volume: number; outerVolume: number; cavityVolume: number; thickness: number; }; report?: { minWall?: number; walls?: any[]; [key: string]: any; }; }—
SHELL_REASON_CODESSHELL_REASON_CODES: Record<string, string>—

ops.offset namespace

General robust body offset (CADSF-262): uniform (distance) or per-face variable (opts.faceDistances) — see ops/offset.js's header for the sign convention and the local/convexTrim construction paths.

MemberDeclarationNotes
offsetBodyoffsetBody(parser: StepParser, solidId: number, distance: number, opts?: { faceDistances?: Record<number, number> | Map<number, number>; }): { solidId: number; parser: StepParser; analytic: { volumeBefore: number; volumeAfter: number; distance: number | null; }; report: { path: 'local' | 'convexTrim'; trimmedFaces: number[]; }; }—
CURVED_REFUSAL_CODES loose 0.x typingCURVED_REFUSAL_CODES: anyRuntime object member; present on the shipped object, type not declared.
REFUSAL_CODES loose 0.x typingREFUSAL_CODES: anyRuntime object member; present on the shipped object, type not declared.
offsetBodyCurved loose 0.x typingoffsetBodyCurved(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.holes namespace

Manufacturing holes (drill / tapped / counterbore / countersink) cut into a body, with the ISO thread, tap-drill and clearance tables.

MemberDeclarationNotes
makeHolemakeHole(base: { parser: StepParser; solidId: number; }, spec?: HoleSpec): HoleResult—
callout partly typedcallout(feature: Record<string, any>): stringDrawing callout text for a hole feature, e.g. "M8x1.25 - 6H ⌵ 12".
resolveThread loose 0.x typingresolveThread(size: string, opts?: Record<string, any>): Record<string, any>—
tapDrilltapDrill(size: string): numberTap-drill Ø for a thread size (chart, falling back to major − pitch).
tapDrillTheoreticaltapDrillTheoretical(size: string): number—
clearanceHoleclearanceHole(size: string): numberISO 273 medium clearance Ø for a bolt of this size.
counterboreSpec loose 0.x typingcounterboreSpec(size: string): Record<string, any>—
countersinkSpec loose 0.x typingcountersinkSpec(size: string): Record<string, any>—
nominalnominal(size: string): number—
THREAD_PITCHTHREAD_PITCH: Record<string, number>—
TAP_DRILLTAP_DRILL: Record<string, number>—
CLEARANCECLEARANCE: Record<string, number>—
CBORE loose 0.x typingCBORE: Record<string, any>—
CSK loose 0.x typingCSK: Record<string, any>—

ops.blend namespace

Edge fillets (rolling-ball blends). The result is a NEW solid in the same parser; every refusal is named (.reasonCode).

MemberDeclarationNotes
blendConvexEdgesblendConvexEdges(parser: StepParser, solidId: number, spec: BlendSpec, opts?: DressUpOptions): DressUpResultRound EVERY edge of a convex planar-faced solid.
blendSelectedEdgesblendSelectedEdges(parser: StepParser, solidId: number, spec: BlendSpec, edgeIds: number[], opts?: DressUpOptions): DressUpResultRound only edgeIds (straight, tangent-chain, circular-rim and NURBS edges are each routed to their own construction).
blendEdgesblendEdges(parser: StepParser, solidId: number, spec: BlendSpec, opts?: DressUpOptions): DressUpResultThe router: opts.edges selects per-edge, omitted = whole body. Reports per-edge outcomes on edgeReport.
blendBoxEdgesblendBoxEdges(parser: StepParser, solidId: number, spec: BlendSpec, opts?: DressUpOptions): DressUpResultHistorical WI-3.7 name of blendConvexEdges.
blendCircularRimblendCircularRim(parser: StepParser, solidId: number, spec: BlendSpec, edgeIds: number[]): DressUpResultCADSB-123: exact toroidal fillet on a complete circular rim (hole mouth / boss base).
blendTangentChainblendTangentChain(parser: StepParser, solidId: number, spec: BlendSpec, edgeIds: number[], opts?: DressUpOptions): DressUpResultCADSB-407: fillet the tangent-continuous chain(s) through the picked edges.
blendNurbsEdgeblendNurbsEdge(parser: StepParser, solidId: number, spec: BlendSpec, edgeId: number, opts?: DressUpOptions): DressUpResult—
tangentChaintangentChain(parser: StepParser, solidId: number, edgeId: number): number[]The tangent-continuous edge chain through edgeId.
REASON_CODESREASON_CODES: Record<string, string>—
SELECTED_REASON_CODESSELECTED_REASON_CODES: Record<string, string>—
PARTITION_REASON_CODESPARTITION_REASON_CODES: Record<string, string>—
RIM_REASON_CODESRIM_REASON_CODES: Record<string, string>—
NURBS_REASON_CODESNURBS_REASON_CODES: Record<string, string>—
BAND_SPLICE_OPEN_BOUND loose 0.x typingBAND_SPLICE_OPEN_BOUND: anyRuntime string member; present on the shipped object, type not declared.
CHAIN_PROPAGATION_KILL_ENV loose 0.x typingCHAIN_PROPAGATION_KILL_ENV: anyRuntime string member; present on the shipped object, type not declared.
CIRCLE_BAND_REASON_CODES loose 0.x typingCIRCLE_BAND_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
CURVED_END_SPLICE loose 0.x typingCURVED_END_SPLICE: anyRuntime string member; present on the shipped object, type not declared.
ENTRY_REASON_CODES loose 0.x typingENTRY_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
FACE_BLEND_REASON_CODES loose 0.x typingFACE_BLEND_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
FLUSH_POCKET_JOINT loose 0.x typingFLUSH_POCKET_JOINT: anyRuntime boolean member; present on the shipped object, type not declared.
MIXED_CHAIN_KILL_ENV loose 0.x typingMIXED_CHAIN_KILL_ENV: anyRuntime string member; present on the shipped object, type not declared.
blendConvexOrPartitioned loose 0.x typingblendConvexOrPartitioned(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
blendEdgeSet loose 0.x typingblendEdgeSet(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
chainBuilderGate loose 0.x typingchainBuilderGate(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
classifyEdgeSet loose 0.x typingclassifyEdgeSet(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
curveTangentInfo loose 0.x typingcurveTangentInfo(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
faceBlend loose 0.x typingfaceBlend(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
fullRound loose 0.x typingfullRound(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
normalizedChainPick loose 0.x typingnormalizedChainPick(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
partitionConvexBlend loose 0.x typingpartitionConvexBlend(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
propagateTangentChain loose 0.x typingpropagateTangentChain(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
tangentAt loose 0.x typingtangentAt(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.chamfer namespace

Edge chamfers — the flat twin of blend, same selection routes.

MemberDeclarationNotes
chamferConvexEdgeschamferConvexEdges(parser: StepParser, solidId: number, spec: ChamferSpec, opts?: DressUpOptions): DressUpResult—
chamferSelectedEdgeschamferSelectedEdges(parser: StepParser, solidId: number, spec: ChamferSpec, edgeIds: number[], opts?: DressUpOptions): DressUpResult—
chamferEdgeschamferEdges(parser: StepParser, solidId: number, spec: ChamferSpec, opts?: DressUpOptions): DressUpResultThe router (CADSF-451): opts.edges selects per-edge, omitted = whole body.
chamferBoxEdgeschamferBoxEdges(parser: StepParser, solidId: number, spec: ChamferSpec, opts?: DressUpOptions): DressUpResult—
chamferCircularRimchamferCircularRim(parser: StepParser, solidId: number, spec: ChamferSpec, edgeIds: number[], opts?: DressUpOptions): DressUpResultCADSF-455: exact conical bevel on a complete circular rim (countersink / lead-in).
chamferConeRimchamferConeRim(parser: StepParser, solidId: number, spec: ChamferSpec, edgeIds: number[], opts?: DressUpOptions): DressUpResult—
chamferNurbsEdgechamferNurbsEdge(parser: StepParser, solidId: number, spec: ChamferSpec, edgeId: number, opts?: DressUpOptions): DressUpResult—
REASON_CODESREASON_CODES: Record<string, string>—
SELECTED_REASON_CODESSELECTED_REASON_CODES: Record<string, string>—
PARTITION_REASON_CODESPARTITION_REASON_CODES: Record<string, string>—
CONE_REASON_CODESCONE_REASON_CODES: Record<string, string>—
CHAMFER_REFUSED_INHERITED_CODES loose 0.x typingCHAMFER_REFUSED_INHERITED_CODES: anyRuntime array member; present on the shipped object, type not declared.
SPHERE_END_REASON_CODES loose 0.x typingSPHERE_END_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
chamferConvexOrPartitioned loose 0.x typingchamferConvexOrPartitioned(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
chamferSphereEnd loose 0.x typingchamferSphereEnd(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
coneRemovedVolume loose 0.x typingconeRemovedVolume(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.boolean namespace

Booleans. subtract / union / intersect take the exact pierce fast path where its hypothesis holds and the general classify-and- stitch engine otherwise; the result is a NEW solid, inputs untouched. CADSF-236 adds the ACIS-style selective boolean (cell decomposition).

MemberDeclarationNotes
subtract partly typedsubtract(parser: StepParser, baseId: number, toolId: number, opts?: Record<string, any>): EditResult—
union partly typedunion(parser: StepParser, baseId: number, toolId: number, opts?: Record<string, any>): EditResult—
intersect partly typedintersect(parser: StepParser, baseId: number, toolId: number, opts?: Record<string, any>): EditResult—
decomposeCells loose 0.x typingdecomposeCells(parser: StepParser, aId: number, bId: number, opts?: Record<string, any>): Record<string, any>Stage 1: the cellular decomposition of A and B.
selectiveBooleanStage1 loose 0.x typingselectiveBooleanStage1(parser: StepParser, aId: number, bId: number, opts?: Record<string, any>): Record<string, any>—
selectiveBooleanStage2 loose 0.x typingselectiveBooleanStage2(state: Record<string, any>, selection: unknown, opts?: Record<string, any>): Record<string, any>Stage 2: one body (one per lump when disconnected) from a cell selection.
selectiveBoolean loose 0.x typingselectiveBoolean(parser: StepParser, aId: number, bId: number, selection?: unknown, opts?: Record<string, any>): Record<string, any>Both stages; selection = 'all' | cell predicate / list.
imprint loose 0.x typingimprint(parser: StepParser, aId: number, bId: number, opts?: Record<string, any>): Record<string, any>Imprint the operands' shared boundary on each other, unselected.
detectSliverFaces loose 0.x typingdetectSliverFaces(parser: StepParser, solidId: number, opts?: { minArea?: number; maxAspect?: number; }): Record<string, any>Sliver-face / short-edge / self-intersection audits of a body.
detectShortEdges loose 0.x typingdetectShortEdges(parser: StepParser, solidId: number, opts?: Record<string, any>): Record<string, any>—
checkFaceFaceIntersections loose 0.x typingcheckFaceFaceIntersections(parser: StepParser, solidId: number, opts?: Record<string, any>): Record<string, any>—
classifyReasonclassifyReason(message: string): string | null—
REASON_CODESREASON_CODES: Record<string, string>—
BOXCYL_REFUSAL_CODES loose 0.x typingBOXCYL_REFUSAL_CODES: anyRuntime object member; present on the shipped object, type not declared.
CAPTURE_DIR_DEFAULT loose 0.x typingCAPTURE_DIR_DEFAULT: anyRuntime string member; present on the shipped object, type not declared.
CAPTURE_MAX_BYTES loose 0.x typingCAPTURE_MAX_BYTES: anyRuntime number member; present on the shipped object, type not declared.
CAPTURE_SCHEMA loose 0.x typingCAPTURE_SCHEMA: anyRuntime string member; present on the shipped object, type not declared.
CONTACT_OVERLAP_FRACTION loose 0.x typingCONTACT_OVERLAP_FRACTION: anyRuntime number member; present on the shipped object, type not declared.
COPLANAR_REL loose 0.x typingCOPLANAR_REL: anyRuntime number member; present on the shipped object, type not declared.
CURVED_REFUSAL_CODES loose 0.x typingCURVED_REFUSAL_CODES: anyRuntime object member; present on the shipped object, type not declared.
CYLCYL_REFUSAL_CODES loose 0.x typingCYLCYL_REFUSAL_CODES: anyRuntime object member; present on the shipped object, type not declared.
CYLTORUS_REFUSAL_CODES loose 0.x typingCYLTORUS_REFUSAL_CODES: anyRuntime object member; present on the shipped object, type not declared.
FF_MAX_CANDIDATE_PAIRS loose 0.x typingFF_MAX_CANDIDATE_PAIRS: anyRuntime number member; present on the shipped object, type not declared.
PRISMCYL_REFUSAL_CODES loose 0.x typingPRISMCYL_REFUSAL_CODES: anyRuntime object member; present on the shipped object, type not declared.
SLOTCYL_REFUSAL_CODES loose 0.x typingSLOTCYL_REFUSAL_CODES: anyRuntime object member; present on the shipped object, type not declared.
SPLIT_BY_PLANE_REASONS loose 0.x typingSPLIT_BY_PLANE_REASONS: anyRuntime array member; present on the shipped object, type not declared.
apiImprint loose 0.x typingapiImprint(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
booleanComplete loose 0.x typingbooleanComplete(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
booleanStart loose 0.x typingbooleanStart(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
booleanUnionMany loose 0.x typingbooleanUnionMany(...args: any[]): anyRuntime method taking 0 declared parameters; present on the shipped object, signature not typed.
captureBooleanInputs loose 0.x typingcaptureBooleanInputs(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
captureDir loose 0.x typingcaptureDir(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
captureSubgraph loose 0.x typingcaptureSubgraph(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
imprintOnly loose 0.x typingimprintOnly(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
intersectConvex loose 0.x typingintersectConvex(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
makeCells loose 0.x typingmakeCells(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
measureContact loose 0.x typingmeasureContact(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
planeSide loose 0.x typingplaneSide(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
pointInMesh loose 0.x typingpointInMesh(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
rehydrateCapture loose 0.x typingrehydrateCapture(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
segTriHit loose 0.x typingsegTriHit(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
triTriHit loose 0.x typingtriTriHit(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.surgery namespace

Face-level surgery: delete-and-cap, split by plane, push/pull.

MemberDeclarationNotes
deleteFaceAndCap partly typeddeleteFaceAndCap(parser: StepParser, solidId: number, faceId: number, opts?: Record<string, any>): EditResult—
splitByPlane loose 0.x typingsplitByPlane(parser: StepParser, solidId: number, plane: Record<string, any>, opts?: Record<string, any>): Record<string, any>—
pushPullFace partly typedpushPullFace(parser: StepParser, solidId: number, faceId: number, distance: number, opts?: Record<string, any>): EditResult—
canPushPullFace loose 0.x typingcanPushPullFace(parser: StepParser, solidId: number, faceId: number, opts?: Record<string, any>): Record<string, any>—
splitFaceByPlane loose 0.x typingsplitFaceByPlane(parser: StepParser, solidId: number, faceId: number, plane: Record<string, any>, opts?: Record<string, any>): Record<string, any>—
splitPeriodicFace loose 0.x typingsplitPeriodicFace(parser: StepParser, solidId: number, faceId: number, opts?: Record<string, any>): Record<string, any>—
splitEdgeAt loose 0.x typingsplitEdgeAt(parser: StepParser, solidId: number, edgeId: number, opts?: Record<string, any>): Record<string, any>—
DELETE_FACE_REASON_CODES loose 0.x typingDELETE_FACE_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
PUSHPULL_REASON_CODES loose 0.x typingPUSHPULL_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
SPLIT_BY_PLANE_REASON_CODES loose 0.x typingSPLIT_BY_PLANE_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
SPLIT_EDGE_REASON_CODES loose 0.x typingSPLIT_EDGE_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
SPLIT_FACE_REASON_CODES loose 0.x typingSPLIT_FACE_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
SPLIT_PERIODIC_FACE_REASON_CODES loose 0.x typingSPLIT_PERIODIC_FACE_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
Surgeon loose 0.x typingSurgeon(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
collapseCrossings loose 0.x typingcollapseCrossings(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
faceOutwardNormal loose 0.x typingfaceOutwardNormal(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
facePlaneOutwardNormal loose 0.x typingfacePlaneOutwardNormal(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
pointTriDist loose 0.x typingpointTriDist(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
rebuildFaceWithEdgeSplits loose 0.x typingrebuildFaceWithEdgeSplits(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
sampleEdgeUse loose 0.x typingsampleEdgeUse(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.moveFace namespace

Direct edit (CADSF-537 wiring). moveFace applies a rigid motion (translate / offset along the face normal / rotate) to one PLANAR face and regenerates its neighbours; canMoveFace answers the same question read-only. See ops/moveFace.js's header.

MemberDeclarationNotes
moveFace loose 0.x typingmoveFace: Function—
canMoveFace loose 0.x typingcanMoveFace: Function—
analyzeMoveFace loose 0.x typinganalyzeMoveFace: Function—
MOVE_FACE_REASON_CODESMOVE_FACE_REASON_CODES: Record<string, string>—
CONE_MOVE_FACE_REASON_CODES loose 0.x typingCONE_MOVE_FACE_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
CYL_MOVE_FACE_REASON_CODES loose 0.x typingCYL_MOVE_FACE_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
SPHERE_MOVE_FACE_REASON_CODES loose 0.x typingSPHERE_MOVE_FACE_REASON_CODES: anyRuntime object member; present on the shipped object, type not declared.
newell loose 0.x typingnewell(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
normalizeMotion loose 0.x typingnormalizeMotion(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
polyhedralVolume loose 0.x typingpolyhedralVolume(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
signedArea loose 0.x typingsignedArea(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
surfaceInvariantUnderMotion loose 0.x typingsurfaceInvariantUnderMotion(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.moveFaceCylinder namespace

Direct edit, CYLINDRICAL faces (CADSF-1062). offset is a RADIUS delta (resize a bore, grow a boss) and translate shifts a whole cylinder; the rims are re-fitted and the planar/coaxial neighbours re-trimmed. Reached automatically through moveFace.moveFace on a cylindrical pick. See ops/moveFaceCylinder.js's header.

MemberDeclarationNotes
moveFaceCylinder loose 0.x typingmoveFaceCylinder: Function—
canMoveFaceCylinder loose 0.x typingcanMoveFaceCylinder: Function—
analyzeMoveFaceCylinder loose 0.x typinganalyzeMoveFaceCylinder: Function—
CYL_MOVE_FACE_REASON_CODESCYL_MOVE_FACE_REASON_CODES: Record<string, string>—
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.moveFaceCone namespace

CADSF-2169: the CONICAL half of move face — offset resizes with the semi-angle kept (R' = R + d / cos α), translate slides it along its axis. Reached automatically through moveFace.moveFace on a conical pick.

MemberDeclarationNotes
moveFaceCone loose 0.x typingmoveFaceCone: Function—
canMoveFaceCone loose 0.x typingcanMoveFaceCone: Function—
analyzeMoveFaceCone loose 0.x typinganalyzeMoveFaceCone: Function—
CONE_MOVE_FACE_REASON_CODESCONE_MOVE_FACE_REASON_CODES: Record<string, string>—
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.moveFaceSphere namespace

CADSF-2169: the SPHERICAL half of move face — offset resizes (R' = R + d), translate shifts the centre. Reached automatically through moveFace.moveFace on a spherical pick.

MemberDeclarationNotes
moveFaceSphere loose 0.x typingmoveFaceSphere: Function—
canMoveFaceSphere loose 0.x typingcanMoveFaceSphere: Function—
analyzeMoveFaceSphere loose 0.x typinganalyzeMoveFaceSphere: Function—
SPHERE_MOVE_FACE_REASON_CODESSPHERE_MOVE_FACE_REASON_CODES: Record<string, string>—
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.healFace namespace

Delete a face and HEAL the wound by extending the faces around it (CADSF-255), rather than re-capping it with a copy of itself — also reachable as ops.surgery.deleteFaceAndCap(p, s, f, { heal: true }). See ops/healFace.js's header.

MemberDeclarationNotes
deleteFaceAndHeal loose 0.x typingdeleteFaceAndHeal: Function—
analyzeHeal loose 0.x typinganalyzeHeal: Function—
HEAL_FACE_REASON_CODESHEAL_FACE_REASON_CODES: Record<string, string>—
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.draft namespace

Mould draft / taper on a PLANAR-faced solid about a neutral plane (CADSF-259). See ops/draft.js's header for the v1 scope.

MemberDeclarationNotes
draftFaces loose 0.x typingdraftFaces: Function—
DRAFT_REASON_CODESDRAFT_REASON_CODES: string[]—
NURBS_DRAFT_UNSUPPORTED loose 0.x typingNURBS_DRAFT_UNSUPPORTED: anyRuntime string member; present on the shipped object, type not declared.
draftNurbsFaces loose 0.x typingdraftNurbsFaces(...args: any[]): anyRuntime method taking 6 declared parameters; present on the shipped object, signature not typed.
draftRevolvedFaces loose 0.x typingdraftRevolvedFaces(...args: any[]): anyRuntime method taking 6 declared parameters; present on the shipped object, signature not typed.
resolveNeutral loose 0.x typingresolveNeutral(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
revolvedSolidVolume loose 0.x typingrevolvedSolidVolume(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.featureRecognition namespace

Read-only feature recognition over a finished body (CADSF-257): holes, pockets, bosses, fillets and chamfers off the face-adjacency graph, each with a confidence.

MemberDeclarationNotes
recognize loose 0.x typingrecognize: Function—
recognizeMany loose 0.x typingrecognizeMany: Function—
confidentOnly loose 0.x typingconfidentOnly: Function—
CONFIDENCE loose 0.x typingCONFIDENCE: anyRuntime object member; present on the shipped object, type not declared.
FEATURE_TYPES loose 0.x typingFEATURE_TYPES: anyRuntime object member; present on the shipped object, type not declared.
TOL loose 0.x typingTOL: anyRuntime object member; present on the shipped object, type not declared.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.defeature namespace

Recognition-driven defeaturing (CADSF-780): remove recognized holes/bosses/fillets/chamfers under per-class size thresholds, each wound healed by ops/healFace. Confident features only; refusals reported by name in the result's skipped[].

MemberDeclarationNotes
defeature loose 0.x typingdefeature: Function—
summarize loose 0.x typingsummarize: Function—
DEFEATURE_SKIP_REASONSDEFEATURE_SKIP_REASONS: Record<string, string>—
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.blendRecognition namespace

B-rep blend-NETWORK recognition (CADSF-1623): edge blends, vertex blends (sphere/torus corner patches) and cliff blends, grouped into connected clusters, each with a confidence. Read-only.

MemberDeclarationNotes
recognizeBlends loose 0.x typingrecognizeBlends: Function—
BLEND_KINDSBLEND_KINDS: Record<string, string>—
PROFILE loose 0.x typingPROFILE: anyRuntime object member; present on the shipped object, type not declared.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.blendSuppress namespace

Blend suppression by network (CADSF-1623): every confident cluster under maxRadius (or containing the given faces) is removed and its sharp edges/corners solved from the planar supports; ops/check-gated, with a validity + mass-property comparison in verification.

MemberDeclarationNotes
suppressBlends loose 0.x typingsuppressBlends: Function—
suppressCluster loose 0.x typingsuppressCluster: Function—
verifyResult loose 0.x typingverifyResult: Function—
BLEND_SUPPRESS_REASON_CODESBLEND_SUPPRESS_REASON_CODES: Record<string, string>—
massOf loose 0.x typingmassOf(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.standardParts namespace

Read-only standard-part recognition (hex bolt / bearing ring / dowel pin) against the published dimension tables.

MemberDeclarationNotes
recognize loose 0.x typingrecognize: Function—
recognizeMany loose 0.x typingrecognizeMany: Function—
reviewScopeFor loose 0.x typingreviewScopeFor: Function—
CATALOG loose 0.x typingCATALOG: anyRuntime object member; present on the shipped object, type not declared.
FAMILIES loose 0.x typingFAMILIES: anyRuntime object member; present on the shipped object, type not declared.
GRIPPERS loose 0.x typingGRIPPERS: anyRuntime object member; present on the shipped object, type not declared.
INTERFACES loose 0.x typingINTERFACES: anyRuntime object member; present on the shipped object, type not declared.
ISO_9409_1_A50 loose 0.x typingISO_9409_1_A50: anyRuntime object member; present on the shipped object, type not declared.
PARALLEL_2F_85 loose 0.x typingPARALLEL_2F_85: anyRuntime object member; present on the shipped object, type not declared.
STANDARDS loose 0.x typingSTANDARDS: anyRuntime object member; present on the shipped object, type not declared.
buildParallelGripper loose 0.x typingbuildParallelGripper(...args: any[]): anyRuntime method taking 0 declared parameters; present on the shipped object, signature not typed.
buildStandardPart loose 0.x typingbuildStandardPart(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
buildToolFlange loose 0.x typingbuildToolFlange(...args: any[]): anyRuntime method taking 0 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.eligibility namespace

Which bodies an operator can run on at all (CADSF-463) — the selection filter behind the operator dialogs' body picker.

MemberDeclarationNotes
classify loose 0.x typingclassify: Function—
classifyMany loose 0.x typingclassifyMany: Function—
probedOps loose 0.x typingprobedOps: Function—
hasProbe loose 0.x typinghasProbe: Function—
labelFor loose 0.x typinglabelFor: Function—
CODE_LABELS loose 0.x typingCODE_LABELS: anyRuntime object member; present on the shipped object, type not declared.
DRAFT_FACE_NOT_PLANAR loose 0.x typingDRAFT_FACE_NOT_PLANAR: anyRuntime string member; present on the shipped object, type not declared.
DRAFT_FACE_SURFACE_UNSUPPORTED loose 0.x typingDRAFT_FACE_SURFACE_UNSUPPORTED: anyRuntime string member; present on the shipped object, type not declared.
ELIGIBILITY_CODES loose 0.x typingELIGIBILITY_CODES: anyRuntime object member; present on the shipped object, type not declared.
MOVE_FACE_PROBE_OFFSET loose 0.x typingMOVE_FACE_PROBE_OFFSET: anyRuntime number member; present on the shipped object, type not declared.
OFFSET_FACES_PROBE_DISTANCE loose 0.x typingOFFSET_FACES_PROBE_DISTANCE: anyRuntime number member; present on the shipped object, type not declared.
REPLACE_FACE_UNSUPPORTED_SOURCE loose 0.x typingREPLACE_FACE_UNSUPPORTED_SOURCE: anyRuntime string member; present on the shipped object, type not declared.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.transform namespace

Rigid transforms and body-level copies. Clone ops return the NEW solid id; the original stays in the parser.

MemberDeclarationNotes
Mat partly typedMat: { identity(): Mat34; translation(tx: number, ty: number, tz: number): Mat34; rotationX(angle: number, center?: Vec3): Mat34; rotationY(angle: number, center?: Vec3): Mat34; rotationZ(angle: number, center?: Vec3): Mat34; rotationAxis(axis: Vec3, angle: number, center?: Vec3): Mat34; rotation(spec: Record<string, any>, defaultCenter?: Vec3): Mat34; mirrorPlane(normal: Vec3): Mat34; det(M: Mat34): number; compose(A: Mat34, B: Mat34): Mat34; [key: string]: any; }3×4 matrix constructors: identity, translation, rotationX/Y/Z, rotationAxis, rotation(spec), mirrorPlane, det, compose.
applyPointapplyPoint(M: Mat34, p: Vec3): Vec3—
applyDirapplyDir(M: Mat34, d: Vec3): Vec3—
copycopy(parser: StepParser, solidId: number): numberClone a solid unchanged; returns the new solid id.
transformtransform(parser: StepParser, solidId: number, M: Mat34): numberClone a solid through M; returns the new solid id.
mirrormirror(parser: StepParser, solidId: number, normal: Vec3): numberMirror a solid across the plane through the origin with this normal (edge senses are flipped so the copy is not inside-out).
linearPatternlinearPattern(parser: StepParser, solidId: number, count: number, step: Vec3): number[]N copies translated by step each (instance 0 = original); returns the clone ids 1..N-1.
circularPatterncircularPattern(parser: StepParser, solidId: number, count: number, center?: Vec3, totalAngle?: number): number[]N copies rotated about +Z through center, evenly over totalAngle (default 2π).
directionPatterndirectionPattern(parser: StepParser, solidId: number, directions: Vec3[], center?: Vec3): number[]CADSF-725: N instances each rotated about center from directions[0] onto directions[i].
graft partly typedgraft(dstParser: StepParser, srcParser: StepParser, rootId: number, opts?: { imported?: boolean; matrix?: Mat34; [key: string]: any; }): numberCopy the sub-graph rooted at rootId from srcParser into dstParser (identity, or through opts.matrix); returns the new root id.
NON_RIGID_REFUSAL loose 0.x typingNON_RIGID_REFUSAL: anyRuntime string member; present on the shipped object, type not declared.
alignAxisAngle loose 0.x typingalignAxisAngle(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
cloneSubgraph loose 0.x typingcloneSubgraph(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
coplanarNormal loose 0.x typingcoplanarNormal(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
instanceCopy loose 0.x typinginstanceCopy(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
linearKind loose 0.x typinglinearKind(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
patternInstanceOf loose 0.x typingpatternInstanceOf(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
recallGraft loose 0.x typingrecallGraft(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
recordGraft loose 0.x typingrecordGraft(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
recordPatternInstance loose 0.x typingrecordPatternInstance(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
translateGrafted loose 0.x typingtranslateGrafted(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
wasImported loose 0.x typingwasImported(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.patterns namespace

CADSF-163 FEATURE-level patterns: N tool instances boolean-cut (or -added) into the base, producing ONE watertight solid. count includes the seed instance at i = 0.

MemberDeclarationNotes
linearPatternlinearPattern(parser: StepParser, baseId: number, toolId: number, direction: Vec3, count: number, spacing: number, opts?: PatternOptions): PatternResult—
circularPatterncircularPattern(parser: StepParser, baseId: number, toolId: number, count: number, opts?: PatternOptions & { axisOrigin?: Vec3; axisDir?: Vec3; angle?: number; }): PatternResult—
mirrormirror(parser: StepParser, baseId: number, toolId: number, opts: PatternOptions & { normal: Vec3; point?: Vec3; }): PatternResultReflect a FEATURE across the plane (point, normal) and cut/add the mirrored instance.
mirrorSolidmirrorSolid(parser: StepParser, solidId: number, opts: { normal: Vec3; point?: Vec3; }): EditResultReflect a WHOLE body across a plane; returns the mirrored solid id.
rotationAxisrotationAxis(angle: number, axisDir: Vec3, origin?: Vec3): Mat34—
mirrorAtmirrorAt(normal: Vec3, point?: Vec3): Mat34—
retireIntermediate loose 0.x typingretireIntermediate(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.polygonBoolean namespace

CADSF-1748 (PCB [3/10]): 2-D polygon booleans that return polygons. Rings are [[x,y],...] (implicitly closed); results are outer-CCW / holes-CW polygons on a grid of resolution mm (default 1 nm).

MemberDeclarationNotes
unionunion(a: PolygonInput, b?: PolygonInput, opts?: PolygonBooleanOptions): Polygon2d[]—
differencedifference(a: PolygonInput, b: PolygonInput, opts?: PolygonBooleanOptions): Polygon2d[]—
intersectionintersection(a: PolygonInput, b: PolygonInput, opts?: PolygonBooleanOptions): Polygon2d[]—
xorxor(a: PolygonInput, b: PolygonInput, opts?: PolygonBooleanOptions): Polygon2d[]—
boolean partly typedboolean(op: 'union' | 'difference' | 'intersection' | 'xor', a: PolygonInput, b?: PolygonInput, opts?: PolygonBooleanOptions): { polygons: Polygon2d[]; report: Record<string, any>; }The same four operations with the per-run counts (islands, holes, edges, crossings, ms) PCB [4/10] reports per layer.
strokestroke(path: PolygonPath, aperture: Aperture2d, opts?: PolygonBooleanOptions & { cap?: 'round' | 'butt' | 'square'; }): Polygon2d[]Minkowski sum of a path with a convex aperture, unioned.
aperturePolygonaperturePolygon(aperture: Aperture2d, at?: Vec2, rot?: number, opts?: PolygonBooleanOptions): Vec2[]One flash: the aperture rotated by rot degrees and moved to at.
simplifysimplify(polys: PolygonInput, opts?: { minDistance?: number; removeCollinear?: boolean; removeSpikes?: boolean; collinearTol?: number; }): Polygon2d[]—
areaarea(polys: PolygonInput): numberExact shoelace material area of a properly wound set.
audit partly typedaudit(op: 'union' | 'difference' | 'intersection' | 'xor', a: PolygonInput, b?: PolygonInput, opts?: PolygonBooleanOptions & { strictAudit?: boolean; }): { ok: boolean; area: number; reference: number; delta: number; tolerance: number; polygons: Polygon2d[]; report: Record<string, any>; frame: Vec2; }The independent check: the same operation measured by ops/polygonClip.js's exact slab sweep - in the snapped operands' own grid frame (CADSF-2128; frame is that shift in mm), so the audit of a case is the same wherever the case sits.
isSelfIntersectingisSelfIntersecting(ring: Vec2[], opts?: { resolution?: number; }): boolean—
selfIntersectionsselfIntersections(ring: Vec2[], opts?: { resolution?: number; }): Vec2[]—
snapsnap(polys: PolygonInput, opts?: { resolution?: number; }): Vec2[][]The input rings snapped to the grid, in mm.
REFUSAL_CODESREFUSAL_CODES: Record<string, string>—
DEFAULTSDEFAULTS: Record<string, number | string | boolean>—
IndexedSweepStatus loose 0.x typingIndexedSweepStatus(...args: any[]): anyRuntime method taking 7 declared parameters; present on the shipped object, signature not typed.
MAX_SNAP_ROUNDS loose 0.x typingMAX_SNAP_ROUNDS: anyRuntime number member; present on the shipped object, type not declared.
STATUS_BLOCK loose 0.x typingSTATUS_BLOCK: anyRuntime number member; present on the shipped object, type not declared.
SweepStatus loose 0.x typingSweepStatus(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
TICKET loose 0.x typingTICKET: anyRuntime string member; present on the shipped object, type not declared.
arcPoints loose 0.x typingarcPoints(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
brushPolygon loose 0.x typingbrushPolygon(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
buildEdges loose 0.x typingbuildEdges(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
classify loose 0.x typingclassify(...args: any[]): anyRuntime method taking 7 declared parameters; present on the shipped object, signature not typed.
collectRings loose 0.x typingcollectRings(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
convexHull loose 0.x typingconvexHull(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
crossSign loose 0.x typingcrossSign(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
crossingPoint loose 0.x typingcrossingPoint(...args: any[]): anyRuntime method taking 8 declared parameters; present on the shipped object, signature not typed.
gridFrame loose 0.x typinggridFrame(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
mergeEdges loose 0.x typingmergeEdges(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
newEdgeSet loose 0.x typingnewEdgeSet(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
orient loose 0.x typingorient(...args: any[]): anyRuntime method taking 6 declared parameters; present on the shipped object, signature not typed.
pointInRing loose 0.x typingpointInRing(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
pointInRingIndexed loose 0.x typingpointInRingIndexed(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
ringIndex loose 0.x typingringIndex(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
segmentMeetsPixel loose 0.x typingsegmentMeetsPixel(...args: any[]): anyRuntime method taking 6 declared parameters; present on the shipped object, signature not typed.
setCrossingStats loose 0.x typingsetCrossingStats(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
signedArea2 loose 0.x typingsignedArea2(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
snapEdges loose 0.x typingsnapEdges(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
snapRings loose 0.x typingsnapRings(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
snapRoundPass loose 0.x typingsnapRoundPass(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
sortByX loose 0.x typingsortByX(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
splitAll loose 0.x typingsplitAll(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
stitch loose 0.x typingstitch(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
toPolygons loose 0.x typingtoPolygons(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
toPolylines loose 0.x typingtoPolylines(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
verifyStatus loose 0.x typingverifyStatus(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.pcbSolids namespace

CADSF-1749 (PCB [4/10]): the LAYOUT MODEL (docs/PCB_LAYOUT_MODEL.md) as tagged 2.5D solids - one prism per copper island, via barrels, embedded or conformal dielectric. Bodies carry {kind, layer, net, z0, z1, thickness, material, epsilon_r, loss_tangent}; the report has per-layer timings, island/hole counts, the Σ A·t volume audit and checkLocal per body.

MemberDeclarationNotes
pcbSolids partly typedpcbSolids(parser: any, model: Record<string, any>, opts?: Record<string, any>): { parser: any; bodies: Array<{ solidId: string; tag: Record<string, any>; }>; report: Record<string, any>; }—
estimateFaces partly typedestimateFaces(model: Record<string, any>, opts?: Record<string, any>): { faces: number; copper: number; vias: number; dielectric: number; over: boolean; [key: string]: any; }CADSF-1750: the pre-build face-count estimate (no boolean, no extrusion).
DEFAULTS loose 0.x typingDEFAULTS: Record<string, any>—
REFUSAL_CODESREFUSAL_CODES: Record<string, string>—
RegionIndex loose 0.x typingRegionIndex(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
TICKET loose 0.x typingTICKET: anyRuntime string member; present on the shipped object, type not declared.
arcChord loose 0.x typingarcChord(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
arcSteps loose 0.x typingarcSteps(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
capCells loose 0.x typingcapCells(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
capsuleArea loose 0.x typingcapsuleArea(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
capsuleProfile loose 0.x typingcapsuleProfile(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
capsuleRing loose 0.x typingcapsuleRing(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
chamferedRectRing loose 0.x typingchamferedRectRing(...args: any[]): anyRuntime method taking 6 declared parameters; present on the shipped object, signature not typed.
classifyDrill loose 0.x typingclassifyDrill(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
collectDrills loose 0.x typingcollectDrills(...args: any[]): anyRuntime method taking 5 declared parameters; present on the shipped object, signature not typed.
collectLayer loose 0.x typingcollectLayer(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
drawCells loose 0.x typingdrawCells(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
fineRadius loose 0.x typingfineRadius(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
flashRings loose 0.x typingflashRings(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
foldGroup loose 0.x typingfoldGroup(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
grazeRuns loose 0.x typinggrazeRuns(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
groupMinDistance loose 0.x typinggroupMinDistance(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
makeCtx loose 0.x typingmakeCtx(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
paintOrder loose 0.x typingpaintOrder(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
pathArcChord loose 0.x typingpathArcChord(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
pieceRegion loose 0.x typingpieceRegion(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
planDielectric loose 0.x typingplanDielectric(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
planZones loose 0.x typingplanZones(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
recordChord loose 0.x typingrecordChord(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
recordFine loose 0.x typingrecordFine(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
resolveMirrorY loose 0.x typingresolveMirrorY(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
resolveOptions loose 0.x typingresolveOptions(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
resolveStackup loose 0.x typingresolveStackup(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
ringMinDistance loose 0.x typingringMinDistance(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
segSegDist2 loose 0.x typingsegSegDist2(...args: any[]): anyRuntime method taking 8 declared parameters; present on the shipped object, signature not typed.
simplifyByRing loose 0.x typingsimplifyByRing(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
simplifySettle loose 0.x typingsimplifySettle(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
squareThermalPieces loose 0.x typingsquareThermalPieces(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
thermalPieces loose 0.x typingthermalPieces(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
trapezoidRing loose 0.x typingtrapezoidRing(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
zoneOverlap loose 0.x typingzoneOverlap(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
zoneRegions loose 0.x typingzoneRegions(...args: any[]): anyRuntime method taking 4 declared parameters; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.pcbImport namespace

CADSF-1750 (PCB [5/10]): a PCB layout file -> named, tagged, coloured pcbSolids bodies; the function import mode "pcb" and cad_import call.

MemberDeclarationNotes
importPcb partly typedimportPcb(parser: any, input: PcbImportInput, opts?: PcbImportOptions): PcbImportResult—
detectFormatdetectFormat(input: PcbImportInput): { format: string; source: string; }—
readLayout partly typedreadLayout(input: PcbImportInput, readerOpts?: Record<string, any>): { model: Record<string, any>; format: string; source: string; reader: Record<string, any>; }—
FORMATSFORMATS: string[]—
DEFAULT_FACE_BUDGETDEFAULT_FACE_BUDGET: number—
REFUSAL_CODESREFUSAL_CODES: Record<string, string>—
OPTION_KEYSOPTION_KEYS: string[]—
READER_KEYSREADER_KEYS: string[]—
NOT_BUILTNOT_BUILT: Record<string, string>—
TICKET loose 0.x typingTICKET: anyRuntime string member; present on the shipped object, type not declared.
bodyColour loose 0.x typingbodyColour(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
nameBodies loose 0.x typingnameBodies(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
netColour loose 0.x typingnetColour(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
netPalette loose 0.x typingnetPalette(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
remedyFor loose 0.x typingremedyFor(...args: any[]): anyRuntime method taking 2 declared parameters; present on the shipped object, signature not typed.
resolveYAxis loose 0.x typingresolveYAxis(...args: any[]): anyRuntime method taking 3 declared parameters; present on the shipped object, signature not typed.
sniff loose 0.x typingsniff(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
splitOptions loose 0.x typingsplitOptions(...args: any[]): anyRuntime method taking 1 declared parameter; present on the shipped object, signature not typed.
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

ops.exactPredicates namespace

CADSF-1628: Shewchuk's adaptive-precision exact geometric predicates ("Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates", Discrete & Computational Geometry 18(3), 1997; the reference C is public domain). Each returns a number whose SIGN is the sign of the exact determinant for ANY double inputs - no epsilon, no perturbation, no assumption about scale. Use the sign; the magnitude is the filtered floating-point value, not an area.

MemberDeclarationNotes
orient2dorient2d(ax: number, ay: number, bx: number, by: number, cx: number, cy: number): number> 0 counterclockwise, < 0 clockwise, 0 exactly collinear.
orient3dorient3d(ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number, dx: number, dy: number, dz: number): number> 0 when d is below the plane a,b,c (a,b,c counterclockwise seen from above), 0 exactly coplanar.
incircleincircle(ax: number, ay: number, bx: number, by: number, cx: number, cy: number, dx: number, dy: number): number> 0 when d is strictly inside the circle through a,b,c (given counterclockwise), 0 exactly cocircular.
insphereinsphere(ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number, dx: number, dy: number, dz: number, ex: number, ey: number, ez: number): number> 0 when e is strictly inside the sphere through a,b,c,d (ordered so orient3d(a,b,c,d) > 0), 0 exactly cospherical.
orient2dPtsorient2dPts(a: Vec2, b: Vec2, c: Vec2): numberThe same four over point arrays, for callers that already hold points.
orient3dPtsorient3dPts(a: Vec3, b: Vec3, c: Vec3, d: Vec3): number—
incirclePtsincirclePts(a: Vec2, b: Vec2, c: Vec2, d: Vec2): number—
inspherePtsinspherePts(a: Vec3, b: Vec3, c: Vec3, d: Vec3, e: Vec3): number—
exactexact: { orient2d(ax: number, ay: number, bx: number, by: number, cx: number, cy: number): number; orient3d(ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number, dx: number, dy: number, dz: number): number; incircle(ax: number, ay: number, bx: number, by: number, cx: number, cy: number, dx: number, dy: number): number; insphere(ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number, dx: number, dy: number, dz: number, ex: number, ey: number, ez: number): number; }The exact expansion-arithmetic stage on its own, with the adaptive filters skipped - slower, same sign, useful as a test oracle.
stats loose 0.x typingstats(): Record<string, any>Per-predicate call counts and the fraction the stage-A filter settled. Counting is off until setStatsEnabled(true).
resetStatsresetStats(): void—
setStatsEnabledsetStatsEnabled(on: boolean): boolean—
EPSILONEPSILON: number2^-53 and 2^27 + 1, and the error-bound coefficients from the paper.
SPLITTERSPLITTER: number—
ERRBOUNDSERRBOUNDS: Record<string, number>—

ops.implicit namespace

CADSF-1764 (IMPLICIT [1/8]): the signed-distance field layer. Pure functions over {@link ImplicitField}. Primitives are exact; union is exact outside, intersect / subtract exact inside, smooth ops and TPMS are 1-Lipschitz bounds. See ops/implicit.js's header.

MemberDeclarationNotes
spheresphere(c: Vec3, r: number): ImplicitField—
capsulecapsule(p0: Vec3, p1: Vec3, r: number): ImplicitFieldA strut: points within r of the segment p0-p1.
cylindercylinder(p0: Vec3, p1: Vec3, r: number): ImplicitFieldFlat-capped cylinder, exact including the cap-edge region.
boxbox(c: Vec3, halfExtents: Vec3): ImplicitField—
torustorus(c: Vec3, axis: Vec3, R: number, r: number): ImplicitFieldRing torus (0 < r < R) about axis.
planeplane(n: Vec3, d: number): ImplicitFieldHalf-space n . p <= d.
transformtransform(field: ImplicitField, m: ImplicitMatrix): ImplicitFieldRigid motion, reflection or uniform scale; anything else is refused.
unionunion(...fields: Array<ImplicitField | ImplicitField[]>): ImplicitField—
intersectintersect(...fields: Array<ImplicitField | ImplicitField[]>): ImplicitField—
subtractsubtract(a: ImplicitField, b: ImplicitField): ImplicitField—
smoothUnionsmoothUnion(a: ImplicitField, b: ImplicitField, k: number): ImplicitFieldPolynomial smooth-min; k is the blend setback (k = 0: union).
smoothIntersectsmoothIntersect(a: ImplicitField, b: ImplicitField, k: number): ImplicitField—
smoothSubtractsmoothSubtract(a: ImplicitField, b: ImplicitField, k: number): ImplicitField—
offsetoffset(field: ImplicitField, d: number): ImplicitFieldf - d.
shellshell(field: ImplicitField, t: number): ImplicitField|f| - t/2.
gyroidgyroid(period: number | Vec3, t?: number, opts?: ImplicitTpmsOptions): ImplicitField—
schwarzPschwarzP(period: number | Vec3, t?: number, opts?: ImplicitTpmsOptions): ImplicitField—
schwarzDschwarzD(period: number | Vec3, t?: number, opts?: ImplicitTpmsOptions): ImplicitField—
lattice partly typedlattice(struts: ImplicitStrut[] | { struts: ImplicitStrut[]; nodes?: Array<{ p: Vec3; [key: string]: any; }>; }, opts?: ImplicitLatticeOptions): ImplicitLatticeFieldUnion of capsules (and node balls) over a strut list, BoxBvh-accelerated; accel: 'none' is the brute-force reference and returns the same doubles.
gradientgradient(field: ImplicitField, p: Vec3, opts?: { h?: number; numeric?: boolean; }): Vec3field.grad when it answers, else central differences.
mapGridmapGrid(field: ImplicitField, bbox: ImplicitBox | null | undefined, h: number, opts?: { at?: 'nodes' | 'centers'; maxSamples?: number; }): ImplicitGridDense sample over a finite box (default field.bbox).
sublevelBoxsublevelBox(field: ImplicitField, c: number): ImplicitBoxA box containing { f <= c } (field.boxAt, or a conservative fallback).
REFUSAL_CODESREFUSAL_CODES: Record<string, string>—
TPMS_LIPSCHITZTPMS_LIPSCHITZ: { gyroid: number; schwarzP: number; schwarzD: number; }Proven bounds on |grad g| of the unscaled TPMS level functions.

ops.implicitGrid namespace

CADSF-1765 (IMPLICIT [2/8]): a field becomes a surface again -- sparse narrow-band sampling (Lipschitz cull, band > sqrt(3) h), face-consistent marching cubes, manifold dual contouring, and a measuring census. Uses {@link ImplicitField.localize} per tile when the field has it (CADSF-2083). See ops/implicitGrid.js's header.

MemberDeclarationNotes
sparseSamplesparseSample(field: ImplicitField, opts: ImplicitSparseSampleOptions): ImplicitSparseGrid—
marchingCubesmarchingCubes(grid: ImplicitSparseGrid, opts?: ImplicitMarchingCubesOptions): ImplicitMesh—
dualContouringdualContouring(grid: ImplicitSparseGrid, opts?: ImplicitDualContouringOptions): ImplicitMesh—
censuscensus(mesh: { positions: ArrayLike<number>; indices: ArrayLike<number>; } | { vertices: number[][]; faces: number[][]; }, opts?: ImplicitCensusOptions): ImplicitMeshCensusAccepts the flat { positions, indices } or the nested { vertices, faces } shape.
toMeshRecordtoMeshRecord(positions: ArrayLike<number> | { positions: ArrayLike<number>; indices: ArrayLike<number>; normalsFlat?: ArrayLike<number>; }, indices?: ArrayLike<number>, normalsFlat?: ArrayLike<number>): { vertices: Vec3[]; faces: Array<[ number, number, number ]>; normals?: Vec3[]; }Flat buffers -> { vertices, faces[, normals] } (or pass a mesh object as the first argument).
nodeValuenodeValue(grid: ImplicitSparseGrid, i: number, j: number, k: number): numberThe stored sample at node (i, j, k), NaN where no tile was allocated.
REFUSAL_CODESREFUSAL_CODES: Record<string, string>—

ops.implicitMeasure namespace

CADSF-1766 (IMPLICIT [3/8]): mass properties, containment and oracles from a field -- volume / centroid / inertia by an independent narrow- band octree (exact marching tetrahedra per leaf, closed-form bulk blocks), Richardson extrapolation, area from the DC mesh, exact inside(). Uses {@link ImplicitField.localize} per 8^3 block when the field has it (CADSF-2083). See ops/implicitMeasure.js's header.

MemberDeclarationNotes
volumevolume(field: ImplicitField, opts: ImplicitMeasureOptions): ImplicitVolumeResult—
volumeRichardsonvolumeRichardson(field: ImplicitField, opts: ImplicitRichardsonOptions): ImplicitRichardsonResult—
centroidcentroid(field: ImplicitField, opts: ImplicitMeasureOptions): { centroid: Vec3; volume: number; ms: number; evaluations: number; }—
inertiainertia(field: ImplicitField, opts: ImplicitMeasureOptions): { inertiaOrigin: number[][]; inertiaCentroid: number[][]; centroid: Vec3; volume: number; ms: number; }MassProperties.js's convention: unit density, 3x3 tensors about the origin and the centroid.
areaarea(field: ImplicitField, opts: ImplicitAreaOptions): { area: number; vertices: number; triangles: number; ms: number; census: ImplicitMeshCensus; }—
insideinside(field: ImplicitField, p: Vec3): booleanExactly field.f(p) <= 0: no grid, no error.
REFUSAL_CODESREFUSAL_CODES: Record<string, string>—

ops.latticeCell namespace

CADSF-1738 (LATTICE [2/9]): periodic unit-cell strut generator (SC, BCC(Z), FCC(Z), OCTET, DIAMOND, KELVIN, JUNGLEGYM) built on one basis- point + connectivity-rule engine. Its struts feed ops.implicit.lattice() directly. See ops/latticeCell.js's header.

MemberDeclarationNotes
latticeCelllatticeCell(opts: LatticeCellOptions): LatticeCellResult—
CELL_TYPESCELL_TYPES: LatticeCellType[]Every supported cell value (includes 'JUNGLEGYM').

ops.latticeOracle namespace

CADSF-1738 (LATTICE [2/9]): a dependency-free Sobol Monte-Carlo union- of-cylinders (and node-sphere) volume oracle, used to validate ops.latticeCell (or any other strut set) against closed forms. See ops/latticeOracle.js's header.

MemberDeclarationNotes
latticeOracle partly typedlatticeOracle(input: LatticeStrut[] | ImplicitStrut[] | { struts: Array<LatticeStrut | ImplicitStrut>; nodes?: LatticeNode[]; bores?: Array<{ p0: Vec3; p1: Vec3; r: number; strut?: number; }>; boreMode?: 'drilled' | 'blind'; clip?: { box: ImplicitBox; [key: string]: any; }; }, opts?: LatticeOracleOptions): LatticeOracleResult—
sobol3sobol3(): () => [ number, number, number ]Returns a stateful generator of points in [0,1)^3 (Joe-Kuo direction numbers, dims 1-3, Gray-code order).
inCylinderinCylinder(seg: ImplicitStrut, p: Vec3): booleanExact point-in-(flat-capped finite cylinder) test.
inSphereinSphere(sp: LatticeOracleSphere, p: Vec3): boolean—
boundsOfboundsOf(struts: ImplicitStrut[], spheres: LatticeOracleSphere[]): ImplicitBoxBounding box of every strut (padded by its radius) and node sphere.
analyticUpperBoundanalyticUpperBound(struts: ImplicitStrut[], spheres: LatticeOracleSphere[]): numberΣπR²L (cylinders) + Σ(4/3)πr³ (node spheres): the analytic total ignoring all overlap.
pairwiseSteinmetzEstimatepairwiseSteinmetzEstimate(struts: ImplicitStrut[], a?: number): numberThe pairwiseSteinmetz estimate on its own (see {@link LatticeOracleResult.pairwiseSteinmetz}); a scales the endpoint-matching tolerance (default 1).
autoHautoH(struts: ImplicitStrut[], spheres: LatticeOracleSphere[]): numberThe 'sdf' backend's default leaf size: the smallest strut/sphere radius / 20.
latticeFill partly typedlatticeFill: { latticeFill(parser: any, solidId: number | string, opts: LatticeFillOptions): LatticeFillResult; fieldOfBrep(parser: any, solidId: number | string, opts?: Record<string, any>): Record<string, any> & { f(p: Vec3): number; }; tpmsCalibration(kind: 'gyroid' | 'schwarzP' | 'schwarzD'): { kind: string; M: number; sigmaU: number; pg0: number; points: number; kernel: number; }; REFUSAL_CODES: Record<string, string>; REMEDIES: Record<string, string>; CELL_NAMES: LatticeFillCell[]; [key: string]: any; }CADSF-1768 (IMPLICIT [5/8]): the lattice fill — the body's field (verified CSG recipe, else analytic-face-refined BVH distance signed by the generalised winding number), a strut or TPMS lattice under a skin, dual-contoured, measured. See ops/latticeFill.js's header.
meshToBrep partly typedmeshToBrep: { meshToBrep(parser: any, mesh: { vertices: number[][]; faces: number[][]; [key: string]: any; }, opts?: { orientShell?: boolean; [key: string]: any; }): Record<string, any>; orientShell(sp: any, solidId: number): MeshToBrepOrientResult; shellSenseCensus(sp: any, solidId: number): MeshToBrepShellSenseCensus; ORIENTATION_INCONSISTENT_CODE: string; ORIENTATION_REPAIRED_CODE: string; REFUSAL_CODES: Record<string, string>; [key: string]: any; }CADSB-1415: opts.orientShell (default true) is meshToBrep's own post-sew orientation repair -- see {@link MeshToBrepOrientResult}. The main route ladder (analytic/polyhedral/recipe/mixed) and its many other options are not typed here; both are read (and, for callers who need them, still reachable) through the index signature below. See ops/meshToBrep.js's header.
meshConverge partly typedmeshConverge: { converge(parser: any, mesh: { vertices: number[][]; faces: number[][]; }, opts?: { target?: Record<string, any>; budget?: { ms?: number; candidates?: number; }; views?: boolean; requireCheckLocal?: boolean; [key: string]: any; }): Record<string, any> & { converge: { target: Record<string, any>; budget: Record<string, any>; baseTolerance: number; iterations: Array<{ n: number; route: string; params: Record<string, any>; metrics: Record<string, any>; ms: number; chosen: boolean; refusal?: { code: string; [key: string]: any; }; }>; winner: number | null; met: boolean; stoppedBecause: string; }; }; ITERATION_CODES: { NO_BODY: string; UNMEASURABLE: string; THREW: string; ORIENTATION: string; CHECK_LOCAL: string; }; [key: string]: any; }CADSF-1416 / CADSB-1415: the CONVERGE LOOP -- tries ops.meshToBrep's route ladder plus a bounded parameter sweep, measures every candidate with ops/meshCompare.js, and grafts only the winner. See ops/meshConverge.js's header.

command documents, sketching and macros · 3

commands namespace

JSON command-document layer (validate + execute), the same format the browser "AI instructions" panel runs.

MemberDeclarationNotes
validate partly typedvalidate(doc: unknown): { valid: boolean; errors: string[]; [key: string]: any; }—
run loose 0.x typingrun(doc: unknown, opts?: Record<string, any>): Record<string, any>—
CommandError partly typedCommandError: new (...args: any[]) => Error—

sketch namespace

MemberDeclarationNotes
Sketch loose 0.x typingSketch: any—
SketchSolver loose 0.x typingSketchSolver: any—

macro namespace

Macro recording + JS scripting API (CADSF-299): a chainable builder over the same command-document ops format commands runs, plus a shared replay() entry point for a recorded viewer session or a hand-authored script. See commands/macro.js's header for the full contract (createMacro, Macro#op/#toRecipe/#toScript, replay).

MemberDeclarationNotes
Macro loose 0.x typingMacro: any—
createMacro loose 0.x typingcreateMacro(meta?: Record<string, unknown>): any—
replay loose 0.x typingreplay(doc: unknown, opts?: Record<string, any>): Record<string, any>—
MACRO_SCHEMA_VERSIONMACRO_SCHEMA_VERSION: string | number—
CommandError partly typedCommandError: new (...args: any[]) => Error—
[key: string] loose 0.x typing[key: string]: anyIndex signature: any other string key is accepted and typed any. The members above are every public member on the shipped object.

licensing (key required since 0.3.0 — see COMMERCIAL.md) · 5

LicenseResult interface

interface LicenseResult
MemberDeclarationNotes
validvalid: boolean—
licenseelicensee?: string—
tiertier?: 'indie' | 'team' | 'oem' | 'studio' | 'owner' | 'partner' | 'free'—
updatesUntilupdatesUntil?: string—
kernelkernel?: boolean0.3.2: true when the key carries the issued kernel entitlement.
reasonreason?: string—

setLicenseKey function

Activate a licence key (offline check, no phone-home). REQUIRED since 0.3.0: every other export throws an Error with code: 'E_LICENSE_REQUIRED' until a valid key is active. Commercial: https://featureboard.ai/nativecad/web/pricing.html. Non-commercial (education, research, makers): keys are issued case by case — request one at support@featureboard.ai. CADSOLVER_LICENSE_KEY and ~/.nativecad/license.json are also read. Since 0.3.2 the self-serve free key (featureboard.ai/register) covers the NativeCAD MCP plugin only: it validates, but the kernel refuses it with code: 'E_LICENSE_REQUIRED', reason: 'free_tier_not_kernel'. A key on the signed revocation list (Licence Watch, CADSF-101272) is refused with code: 'E_LICENSE_REVOKED', reason: 'revoked'.

function setLicenseKey(key: string): LicenseResult;

licenseStatus function

Current license state.

function licenseStatus(): {
    licensed: boolean;
    licensee: string | null;
    kid: string | null;
    tier: string | null;
    updatesUntil: string | null;
    expires: string | null;
    kernel: boolean;
};

isLicensed function

True when a key that may drive the KERNEL is active (reads CADSOLVER_LICENSE_KEY / ~/.nativecad/license.json first). A self-serve free key is valid but answers false (0.3.2).

function isLicensed(): boolean;

version const

const version: string;

Plugin SDK

@nativecad/kernel-sdk 0.2.3

The semver’d surface for adding your own feature ops on top of the kernel without forking it: documents, opaque body handles, op registration, export, tessellation and two transports.

Build feature ops on the NativeCAD solid-modeling kernel without forking it: a semver'd op-registration surface (name + JSON Schema + run(doc,args)), opaque body handles, STEP/STL export, tessellation, and in-process + JSON-RPC-over-stdio transports.

Install

nativecad-kernel-sdk --plugin @acme/nativecad-gears

Quickstart

const sdk = require('@nativecad/kernel-sdk');
sdk.setLicenseKey(process.env.MY_NATIVECAD_KEY);

const doc = sdk.createDocument();
const plate = doc.ops.extrude({ outer: [[0, 0], [80, 0], [80, 40], [0, 40]], depth: 6 });

console.log(sdk.topology(doc, plate));      // { faces: 6, edges: 12, vertices: 8, watertight: true, … }
sdk.export(doc, { format: 'step', path: 'plate.step' });

Both blocks are lifted from packages/kernel-sdk/README.md. 42 exports, 48 documented items: 46 typed, 2 partly typed, 0 loose.

refusals and error codes · 7

ErrorCode type

A E_-prefixed code from the shared refusal vocabulary.

type ErrorCode = 'E_INVALID_ARGS' | 'E_NOT_FOUND' | 'E_PRECONDITION' | 'E_CONFLICT' | 'E_GEOMETRY' | 'E_UNSUPPORTED' | 'E_LIMIT' | 'E_TIMEOUT' | 'E_IO' | 'E_INTERNAL';

ErrorCodeSpec interface

interface ErrorCodeSpec
MemberDeclarationNotes
recoverablerecoverable: boolean—
hinthint: string—

Refusal interface

The envelope an op returns (or the SDK builds from a thrown KernelSdkError).

interface Refusal
MemberDeclarationNotes
refusedreadonly refused: true—
codereadonly code: ErrorCode—
messagereadonly message: string—
hintreadonly hint: string—
recoverablereadonly recoverable: boolean—
detailsreadonly details?: unknown—

KernelSdkError class

class KernelSdkError extends Error
MemberDeclarationNotes
constructorconstructor(code: ErrorCode, message: string, details?: unknown)—
codereadonly code: ErrorCode—
hintreadonly hint: string—
recoverablereadonly recoverable: boolean—
detailsreadonly details?: unknown—
toRefusaltoRefusal(): Refusal—

body handles · 2

BodyHandle class

An opaque reference to one body inside one document. It carries NO kernel address — never parse ref, and never build one by hand.

class BodyHandle
MemberDeclarationNotes
constructorprivate constructor(docId: string, ref: string)—
$brandreadonly $brand: 'nativecad.body'—
docreadonly doc: string—
refreadonly ref: string—
toStringtoString(): string—
toJSONtoJSON(): { $body: string; doc: string; }—

documents · 5

DocumentOps interface

Every kernel verb, as a method on doc.ops (snake_case and camelCase).

interface DocumentOps
MemberDeclarationNotes
runrun(verb: string, args?: Record<string, unknown>): BodyHandle—
listlist(): string[]—
[verb: string] loose 0.x typing[verb: string]: ((args?: Record<string, unknown>) => BodyHandle) | ((verb: string, args?: Record<string, unknown>) => BodyHandle) | (() => string[])Verbs are the registered op names, resolved when called and not fixed in this file; doc.ops.list() returns the current set.

BuildResult interface

interface BuildResult
MemberDeclarationNotes
summarysummary: Record<string, unknown> | null—
bodiesbodies: BodyHandle[]—

Document class

class Document
MemberDeclarationNotes
constructorprivate constructor(options?: DocumentOptions)—
idreadonly id: string—
opsreadonly ops: DocumentOps—
addOpaddOp(verb: string, args?: Record<string, unknown>): BodyHandle—
reciperecipe(): { version: number; ops: Array<Record<string, unknown>>; }—
opIdsopIds(): string[]—
buildbuild(): BuildResult—
bodiesbodies(): BodyHandle[]—

DocumentOptions interface

interface DocumentOptions
MemberDeclarationNotes
baseDirbaseDir?: stringBase for relative paths in file-touching ops (import, save). Default ''.
deadlineAtdeadlineAt?: numberAbsolute Date.now() the whole build must finish by; 0 = unbounded.
idid?: string—

declaring and running ops · 5

OpSpec interface partly typed

What a plugin declares. run gets a Document and the validated args.

interface OpSpec
MemberDeclarationNotes
namename: string—
namespacenamespace?: string—
titletitle?: string—
descriptiondescription?: string—
inputSchema loose 0.x typinginputSchema?: Record<string, unknown>JSON Schema, type: "object". Shipped verbatim in an MCP tools/list.
outputSchema loose 0.x typingoutputSchema?: Record<string, unknown>—
run partly typedrun(doc: Document, args: Record<string, any>, sdkCtx?: { sdk: typeof import('./index'); refusal: typeof refusal; }): unknown | Refusal—

OpRecord interface

interface OpRecord
MemberDeclarationNotes
namereadonly name: string—
namespacereadonly namespace: string | null—
qualifiedNamereadonly qualifiedName: string—
titlereadonly title?: string—
descriptionreadonly description: string—
inputSchema loose 0.x typingreadonly inputSchema: Record<string, unknown>—
outputSchema loose 0.x typingreadonly outputSchema?: Record<string, unknown>—
sourcereadonly source: string | null—
runrun: OpSpec['run']—

OpListing interface

interface OpListing
MemberDeclarationNotes
namename: string—
namespacenamespace: string | null—
opop: string—
titletitle?: string—
descriptiondescription: string—
inputSchema loose 0.x typinginputSchema: Record<string, unknown>—
outputSchema loose 0.x typingoutputSchema?: Record<string, unknown>—
sourcesource: string | null—

ops namespace

MemberDeclarationNotes
registerregister: typeof registerOp—
listlist(): string[]—
listinglisting(): OpListing[]—
getget(name: string): OpRecord | null—
hashas(name: string): boolean—
kernelVerbskernelVerbs(): string[]—
runrun(name: string, doc: Document, args?: Record<string, unknown>): unknown | Refusal—

topology · 2

TopologyReport interface

interface TopologyReport
MemberDeclarationNotes
bodybody?: string—
bodiesbodies?: number—
facesfaces: number—
edgesedges: number—
verticesvertices: number—
watertightwatertight: boolean | null—
volumevolume: number | null—
surfaceAreasurfaceArea?: number | null—
centroidcentroid?: { x: number; y: number; z: number; } | null—
perBodyperBody?: TopologyReport[]—

export · 5

ExportOptions interface

interface ExportOptions
MemberDeclarationNotes
formatformat?: ExportFormat—
ofof?: BodyHandle | stringSTL only: which body. Omit to export every body.
pathpath?: stringWrite the bytes here as well, and echo the resolved path back.
binarybinary?: booleanSTL only; default true (binary).
targetCounttargetCount?: number—
timestamptimestamp?: Date—

ExportResult interface

interface ExportResult
MemberDeclarationNotes
formatformat: ExportFormat—
bytesbytes: number—
texttext?: stringSTEP and ASCII STL.
datadata?: BufferBinary STL.
pathpath?: string—
bodiesbodies?: number—

tessellation · 2

MeshResult interface

interface MeshResult
MemberDeclarationNotes
bodybody: string—
positionspositions: number[]—
indicesindices: number[]—
normalsnormals?: number[]—
verticesvertices: number—
trianglestriangles: number—

licence · 3

LicenseStatus interface

interface LicenseStatus
MemberDeclarationNotes
licensedlicensed: boolean—
licenseelicensee: string | null—
tiertier: string | null—
updatesUntilupdatesUntil: string | null—
kernelkernel: boolean0.2.2: may this licence drive the kernel? false for a self-serve free key (plugin-only).
watermarkwatermark: boolean—
tierstiers: string[]—

setLicenseKey function

Activate a licence key for this process. A license key is REQUIRED for createDocument, builds, export, tessellate, topology and ops.run — without one they refuse with E_LICENSE_REQUIRED. Commercial: https://featureboard.ai/nativecad/web/pricing.html. Non-commercial (education, research, makers): keys are issued case by case — request one at support@featureboard.ai. Since 0.2.2 the self-serve free key covers the NativeCAD MCP plugin only and is refused with details.reason 'free_tier_not_kernel'. A revoked key (Licence Watch, CADSF-101272) is refused with E_LICENSE_REVOKED, details.reason 'revoked'.

function setLicenseKey(key: string): {
    valid: boolean;
    licensee?: string;
    tier?: string;
    reason?: string;
};

plugins · 5

PluginRecord interface

interface PluginRecord
MemberDeclarationNotes
namereadonly name: string—
versionreadonly version: string | null—
sourcereadonly source: string—
opsreadonly ops: readonly string[]—

loadPlugins function

function loadPlugins(specifiers: string[], options?: {
    baseDir?: string;
}): {
    loaded: PluginRecord[];
    failed: Array<{
        specifier: string;
        code: ErrorCode;
        message: string;
    }>;
};

pluginsFromEnv function

function pluginsFromEnv(env?: NodeJS.ProcessEnv): string[];

transports · 3

Transport interface partly typed

interface Transport
MemberDeclarationNotes
methodsreadonly methods: string[]—
call partly typedcall(method: string, params?: Record<string, unknown>): Promise<any>—
callSync loose 0.x typingcallSync(method: string, params?: Record<string, unknown>): any—
sessionreadonly session: unknown—

createRpcServer function

function createRpcServer(options?: {
    input?: NodeJS.ReadableStream;
    output?: NodeJS.WritableStream;
    plugins?: string[];
    baseDir?: string;
}): {
    close(): void;
    readonly session: unknown;
};

package constants · 3

name const

const name: string;

version const

const version: string;