A modeling kernel for architecture based on paper surfaces: flat, ruled and developable faces that can be cut from sheet and laid flat exactly. It is two packages, written in TypeScript, that run in a browser or in Node with no native code and no server:
@commonplace-technologies/kernel: the model, the verbs that edit it,
its history, the read side, display tessellation, save and load.@commonplace-technologies/kernel-step: STEP reading and writing, an
interop add-on. Import places manufactured parts (fixtures, furniture
modeled elsewhere) in a model for context; export sends parts to
fabrication.npm install @commonplace-technologies/kernel
npm install @commonplace-technologies/kernel-step # STEP interop, optional
To run the examples, which import the packages by name, clone the repository:
git clone https://github.com/commonplace-technologies/kernel
cd kernel
npm ci
npm run example:kernel # a curved panel, laid flat
npm run example:kernel:step # STEP interop
These pages are for someone building their own modeler, a viewer, a fabrication tool or a script on the kernel. For what the kernel is and how it works without the code, read How the kernel works, in plain language. Everything in 0.1 is experimental: names and signatures can change between releases.
| Page | What it covers |
|---|---|
| How the kernel works, in plain language | What the kernel is, paper surfaces, what it promises and what it is not, with no code. For readers who will not program against it. |
| Build models with an AI agent | Let an agent such as Claude build, check and export a model from a description, through the kernel's MCP server. No code. |
| Build your own modeler | The loop a modeler runs: load, draw, display, pick, edit, undo, save. Start here. |
| Verbs, by example | One working snippet per verb family: drawing, pushing a face, the offset modes, revolve, loft, sweep, skin, fillet, erase and patch, the Booleans. |
| Paper surfaces | Developable faces made exactly, laid flat with nothing approximated, thickened and cut; creases, folding, nets, and paper models to print. |
| Reading the model | kernelQuery: faces, edges and vertices by id, surface and curve evaluation, neighbors, picking. |
Refusals and canRun |
Each verb's refusal codes as a typed union, refusalCodes, and canRun: whether a verb accepts its operands, before anything is built. |
| Dry runs | { dryRun: true } on every verb: the commit's answer and the frame of the model it would leave, with nothing kept. The preview path. |
| Move, rotate and scale | planTransform and transformEntities: transforming corners, edges and faces with a live preview, which ids survive a weld or a split, and the refusal codes. |
| Erase | erase: deleting vertices, edges and faces, what each kind of id takes with it, and which ids survive. |
| Save and load | saveMesh / loadMesh, the format version, and what stays stable across a save. |
| Loading, host hooks and tolerances | The lane-free ./core entry, loading each capability when it is first needed, the refusal and fallback hooks, and the tolerances a host reads and tunes. |
The package README (src/kernel/README.md) has a first edit in a dozen
lines. examples/kernel/ has runnable scripts and a testbed
(npm run testbed:kernel).
npm run docs:api:kernel
writes the generated reference for both packages to
docs/api/kernel-reference/ (open its index.html). It is built from the
packages' own entries (src/kernel/index.ts, src/kernel-step/index.ts)
and their doc comments, so it lists exactly what a package user can
import.
The kernel holds geometry and the rules it keeps. Everything about a user at a screen belongs to the host:
(u, v)); a host
decides what the cursor means. The host's own cursor
logic is not part of these packages.null or 'unknown'.The repository's limitations index (npm run limitations) lists what is
known not to work, each entry with a regression test.