Document, parameters, expressions, units
packages/docs-examples/src/core/document.ts, units.ts
ok
- holeDiameter
- 10 → 12.5 mm
- volumeHint = holeDiameter × 2
- 20 → 25
- timeline
- translate
- 1 inch
- 25.4 mm
- 2in × 40mm × 5mm
- 10160.00 mm³
Documentation
Every guide lives in the repository under docs/guides/, and every primary public API gets a runnable example under packages/docs-examples/ that the workspace gates typecheck, build, and run. pnpm verify proves them, this page proves them again in your browser. The tables below are generated from the same source constants the code declares, not hand-maintained copies.
Browser-runnable, measured. The async cards boot the real Manifold WASM kernel in-process, and the numbers are the kernel's own measurements.
packages/docs-examples/src/core/document.ts, units.ts
ok
packages/docs-examples/src/core/projection.ts → @slopcad/ui CadViewport
rendering…
The same kernel-neutral projection data the GLB exporter consumes, drawn by the registry's own CAD viewport component: geometry, camera, and lights from the deterministic scene, no host state.
pending
packages/docs-examples/src/kernel/primitives.ts
running…
packages/docs-examples/src/kernel/features.ts
running…
packages/docs-examples/src/components/components.ts
running…
packages/docs-examples/src/core/native.ts
ok
packages/docs-examples/src/io/mesh.ts
ok
packages/docs-examples/src/sketch/sketch.ts
ok
packages/docs-examples/src/sketch/vocabulary.ts
ok
packages/docs-examples/src/react/store.tsx
ok
What each backend declares it can do, read from the kernels' own capability constants (packages/docs-examples/src/kernel/capabilities.ts). A declined operation answers the structured kernel/unsupported-operation, never a silently wrong result.
| capability | manifold | opencascade | jscad | fake |
|---|---|---|---|---|
| booleans | supported | supported | supported | supported |
| translate | supported | supported | supported | supported |
| rotate | not supported | supported | supported | not supported |
| exact primitive vol. | supported | supported | supported | supported |
| exact boolean vol. | supported | supported | not supported | not supported |
| tight boolean bounds | supported | supported | supported | not supported |
| persistent topology | not supported | supported | not supported | not supported |
| sweep | not supported | supported | supported | supported |
| loft | not supported | supported | supported | supported |
| fillet | not supported | supported | not supported | supported |
| chamfer | not supported | supported | not supported | supported |
| shell | not supported | supported | not supported | supported |
| mirror | supported | supported | supported | supported |
| surface area | supported | supported | supported | supported |
✓ declared · — declined (answers kernel/unsupported-operation)
One format preserves the parametric model. Everything else is geometry exchange: deliberate, provenance-marked, and never a fake history.
| format | direction | what a file carries | parametric history |
|---|---|---|---|
| Native slopcad document | save / open | Parameters with expressions, feature graph, bodies, the full transaction log (undo/redo reach), regeneration states, rollback marker | preserved |
| STEP (AP214IS / AP203 / AP242DIS) | export / import | BREP solids in canonical millimetres; import mints provenance-marked solids (origin "imported-step") | — |
| OCCT BREP | export / import | BREP solids; import provenance "imported-brep" | — |
| IGES | import | Meshes only (the occt-import-js fallback reads tessellations, never BREP solids), the same class of body an STL import produces | — |
| STL (binary) | export / import | One triangle soup per solid, canonical millimetres, no part structure | — |
| 3MF | export / import | Mesh + well-known metadata (Title/Designer/Description) + declared unit; import is Node-targeted (node:zlib) | — |
| GLB (glTF 2.0) | export | The render projection: one named node per render object, POSITION/NORMAL accessors, the CadScene material | — |
docs/guides/installation.mdMonorepo checkout, the verify gate, and the external-consumer registry install.
docs/guides/cad-core.mdThe kernel-neutral document: bodies, parameters, features, ids, diagnostics.
example: packages/docs-examples/src/core/document.ts
docs/guides/parameters.mdThe parameter collection: creation, metadata, expressions, edits as commands.
example: packages/docs-examples/src/core/document.ts
docs/guides/expressions.mdThe expression engine: AST, unit literals, functions, dependency extraction.
example: packages/docs-examples/src/core/document.ts
docs/guides/units.mdDimensional values: length/angle/area/volume, conversion, dimensioned arithmetic.
example: packages/docs-examples/src/core/units.ts
docs/guides/primitives.mdBox, sphere, cylinder, cone through the kernel contract, measured and tessellated.
example: packages/docs-examples/src/kernel/primitives.ts
docs/guides/booleans.mdUnion, subtract, intersect: exact for mesh kernels, banded for the fake.
example: packages/docs-examples/src/kernel/primitives.ts
docs/guides/features.mdThe feature graph, transactions, undo/redo, regeneration, rollback, suppression.
example: packages/docs-examples/src/kernel/features.ts
docs/guides/kernels.mdThe pluggable kernel contract and the capability flags every backend declares.
example: packages/docs-examples/src/kernel/capabilities.ts
docs/guides/workers.mdThe versioned worker protocol: node channels, web workers, stale-result guards.
example: packages/docs-examples/src/kernel/workers.ts
docs/guides/r3f.mdThe renderer-neutral projection and the React Three Fiber scene that consumes it.
example: packages/docs-examples/src/core/projection.ts
docs/guides/selection.mdSelection state, pick modes, synthetic faces, persistent topology references.
example: packages/docs-examples/src/core/projection.ts
docs/guides/tools.mdThe headless tool system: runtime, manager, registry, inspection tools.
example: packages/docs-examples/src/core/custom-tool.ts
docs/guides/ui.mdThe @slopcad/ui CAD components and their installation through the registry.
docs/guides/native-files.mdThe one format that preserves parametric history: dual-persisted, replay-checked.
example: packages/docs-examples/src/core/native.ts
docs/guides/mesh-exchange.mdThe cad-io mesh adapters: deterministic bytes, one file per solid, GLB scenes.
example: packages/docs-examples/src/io/mesh.ts
docs/guides/step-iges.mdThe OpenCascade exchange paths: exact BREP solids in, geometry-only provenance out.
example: packages/docs-examples/src/kernel/occt.ts
docs/guides/sketches.mdWorkplanes, entities, serialization, profile resolution for extrusion.
example: packages/docs-examples/src/sketch/sketch.ts
docs/guides/constraints.mdThe constraint vocabulary and the deterministic reference solver.
example: packages/docs-examples/src/sketch/sketch.ts
docs/guides/registry.mdThe Phase 33 registry model: three source registries, byte-reproducible artifacts.
docs/guides/components.mdThe component contract, the execution surfaces, and the shipped three.
example: packages/docs-examples/src/components/components.ts
docs/guides/custom-tools.mdWriting a tool: state, reducer, registry entry, manager lifecycle.
example: packages/docs-examples/src/core/custom-tool.ts
docs/guides/custom-kernels.mdImplementing the kernel contract; the shared suite judges any backend.
example: packages/docs-examples/src/kernel/custom-adapter.ts
docs/guides/testing.mdThe contract suite, semantic assertions, in-memory database, e2e harnesses.
example: packages/docs-examples/src/contract-suite.test.ts
docs/guides/package-boundaries.mdWhat may import what: the allowed-import map and its enforcement.