Docs/CAD

CAD in IndiSpec

IndiSpec CAD is a code-first parametric CAD system. A CAD page stores a FeatureScript-compatible program as its single source of truth; the exact B-rep solid, the tessellated display mesh, the feature history and every diagnostics row are derived from that program by an OpenCascade (OCCT) kernel running in a Web Worker. Nothing derived is ever saved or synced.

The same model gives you two document kinds:

DocumentPage typeWhat it holds
Partcad-partA parametric part program — sketches, extrudes, revolves, holes, patterns, booleans, STEP imports.
Assemblycad-assemblyA placement program — references to part documents and STEP assets, their rigid transforms, materials, inline pipe runs and terrain.

Both are authored through an Onshape-style workbench: every gesture (toolbar button, viewport gizmo, numeric field) is compiled into a marked block of source text, so features are diffable, reviewable, undoable and collaborative. The text editor remains the escape hatch — and the truth.

Why code is the document

  • Exact and repeatable. OCCT evaluates the program to real faces/edges and a STEP-exportable solid, not an approximation of one.
  • Reviewable. A dimension change is a one-line diff, not a binary blob. The assistant and human reviewers see the same program.
  • Derived, not stored. A content hash keys the evaluation cache; the mesh, metrics and history are rebuilt on open. There is no stale derived state.
  • Analysable. Face-group geometry and named boundaries flow into the CFD mapping (see authoring model), not a separate exporter.

The three layers

        authored / synced                derived / never synced
  ┌──────────────────────────┐    ┌──────────────────────────────────┐
  │ page.source  (FS program)│    │ feature history + trace          │
  │ page.imports (STEP)      │───▶│ exact B-rep, faces, mass props   │
  │ page.meta (view state)   │    │ tessellation, diagnostics        │
  └──────────────────────────┘    └──────────────────────────────────┘
                                      │
                            exports: STEP · STL · PNG · CFD package
GuideWhat it covers
Getting startedRun the app, create your first part, the commands that matter.
Part workbenchThe feature toolbar, sketch mode, feature dialogs, parameters, limits.
Assembly workbenchInstances and placement, STEP imports, terrain, materials, pipes.
Authoring modelTool blocks, templates, history, the kernel/worker contract, persistence.

Status

The part and assembly workbenches are shipped in the web app. The developer roadmap and the deeper design notes live in the repository under docs/ — docs/CAD.md is the reference document, docs/CAD-CFD.md covers the CFD mapping, and docs/HIKURANGI-MBR-STAGES.md documents a real plant built with the assembly workbench.