A cabinet that is a rule
A catalogue module used to be a file: one .glb, one size, one price. A
customer who wanted 637 mm got 600, because 637 was not in the catalogue.
A recipe is the same cabinet written as rules. Its width is a parameter, its panels are formulas, and the cabinet at 637 mm exists the moment somebody asks for it — with its own cut list, its own edge banding and its own price. Nobody exports a file, and there is no file to be out of date.
What you write
Section titled “What you write”{ "id": "base_cabinet", "version": 1, "params": [ { "key": "width", "type": "integer", "default": 600, "range": { "from": 300, "to": 1200, "step": 1 } } ], "derived": { "inner_w": "width - 2*t" }, "parts": [ { "id": "side", "role": "side", "size": ["t", "height", "depth"], "at": [0, 0, 0], "repeat": 2, "mirrorX": true, "material": "body", "grain": "y", "edges": { "front": "abs2" } } ], "layout": { "enabled": true, "cavity": { … }, "default": { "cell": { "fill": "shelves", "count": 1 } } }}Five sections, and they run in this order:
params— what the customer chooses. Width, height, a front, a thickness.derived— what you work out once from those.inner_wiswidth - 2*tand everything spanning the inside saysinner_w.rules— what must not happen, and what to do instead. Four kinds; see the language.parts— the panels. Each is a box of three formulas at a position of three formulas, with a material, a grain direction and its banding.layout— the inside, which the CUSTOMER divides: shelves, drawers, a door. You write the cavity and the limits; they arrange it.
What you get back
Section titled “What you get back”Everything downstream is derived from the parts and nothing is authored twice:
| From the parts | Where it goes |
|---|---|
| the boxes | the 3D scene, the AR file |
sheet (length × width × thickness) |
the cut list, the nesting, the DXF |
edges |
the banding order, in metres per type |
hardware |
the fittings order, with supplier codes |
areas, metres, counts, pricing.labour |
the price |
Two things to know before you start
Section titled “Two things to know before you start”Whole millimetres, everywhere. Lengths are integers, angles are whole degrees, money is cents. A formula may divide by three; what comes out is rounded, and the leftover millimetre goes somewhere visible rather than into a fraction nobody can cut.
A published version never changes. Saved kitchens pin themselves to the
version they were quoted from, so editing @1 after a customer has one would
change their price and their cut list under them. Publish @2 instead: the
kitchens on @1 stay exactly as they were.
The pages
Section titled “The pages”- The language — parameters, derived values, rules, and the functions you can use in a formula.
- Parts — roles, grain, edge banding, and how a panel becomes a blank on a sheet.
- The inside — cells, fills and limits: what the customer may do to your cabinet, and what you refuse.
- Worktops and plinths — the parts that belong to a row of cabinets rather than to any one of them, and the one slot that lets a row exist at all.
- Tests and publishing — recorded cut lists, what the validator catches, and how a version goes live.