Repository navigation
CAD Manual IGES and STEP
Manual index · CAD ↔ GPU transfer
Integrated original selected NURBS IGES126/128 export. Closed-solid STEP #527 remains blocked by recorded proof requirements.
Last checked: 2026-10-06. Both packages remain private experimental. API snippets use built local ES modules. Save Node snippets at the repository root after building the relevant package. Browser snippets require their stated host/canvas context.
import {compileCadModel,exportIGES} from './packages/barocss-cad/dist/index.js';
const result=compileCadModel(`@model line_model {
version:0; length-unit:mm;
@curve #edge {type:nurbs;degree:1;knots:[0,0,1,1];
control-points:[[0,0,0],[10,0,0]];weights:[1,1];}
}`,{sourceVersion:0});
if(!result.ok) throw new Error(result.diagnostics[0].message);
const {iges,report}=exportIGES(result.model,['edge']);
console.log(report,iges.length);Use host file storage to write iges unchanged. Selection must contain explicit unique existing geometry IDs. A Curve writes entity126 and a Surface writes entity128. In the workspace, export the accepted selected Surface; pending source or preview triangles do not define its geometry.
IGES5.3 ASCII, MM units, scale1, original poles/weights/knots/domains and selected-ID mapping are retained. Labels hold only the first eight ID characters; the report maps full IDs to file entities. Deterministic metadata/timestamps support byte replay. The report's no-geometric-loss field concerns the selected supported NURBS entities, not feature history or every document property.
Store native source/feature documents separately when editability is required. Per-face or six-surface files do not serialize shared topology, a closed solid, constraints or feature history. Current general/open/nonperiodic flags remain even for geometrically repeated endpoints.
Wrong/missing/duplicate selection, unsupported/native-invalid data and metadata limits reject. Actual consumer checks read original files through installed OCP and compare original/transferred domains, positions/D1, IDs and independent analytic controls. A readable file alone is insufficient; corrupt pointers and readable altered geometry must fail their controls.
The recorded OCP raw surface-domain accessor discrepancy is kept separate from actual transferred BRep domains. The writer retains the standard U0,U1,V0,V1 order. Selected fixture tolerances do not establish universal consumer compatibility.
#527's original bounded axis-box prototype is research, not an available product exporter. Final schema authority, no-healing process control and direct native-ID→entity→transferred-shape association remain unresolved. Do not list STEP as a supported export option or replace original files with a kernel writer to claim a passed gate.
pnpm --filter @barocss/cad build:library
pnpm --filter @barocss/cad test:consumer
BAROCSS_CAD_PYTHON=/Users/user/.barocss-ai/v3/verify-cad-ocp-8.0.1.1.0/bin/python pnpm --filter @barocss/cad test:exchangeUse the installed environment and exact current-head retained consumer evidence. No new download is part of these commands.
#500 original IGES · #527 STEP research · native format boundary. Reference: src/iges.ts.