Molding

JSON format

Your family is saved as a small JSON file. You normally never edit it by hand — the editor writes it — but it is plain and AI-friendly, so here is the shape. Field names are camelCase; lengths are in mm and angles in radians.

{
  "meta": { "template": "metric-door", "name": "Door Basic" },
  "parameters": [
    { "key": "Width",      "type": "length", "isInstance": true,
      "group": "dimensions", "args": { "input": "900" } },
    { "key": "Height",     "type": "length", "isInstance": true,
      "group": "dimensions", "args": { "input": "2100" } },
    { "key": "Thickness",  "type": "length",
      "group": "dimensions", "args": { "input": "45" } },
    { "key": "HalfHeight", "type": "length",
      "group": "constraints", "args": { "formula": "Height / 2" } }
  ],
  "types": [
    { "name": "900 x 2100mm", "values": { "Width": 900, "Height": 2100 } }
  ],
  "nodes": [
    { "nodeType": "material",  "key": "PanelMat",
      "args": { "name": "Wood - Walnut", "color": [120, 81, 45] } },
    { "nodeType": "rectangle", "key": "PanelProfile",
      "args": { "width": "Width", "height": "Height", "center": [0, "HalfHeight"] } },
    { "nodeType": "extrusion", "key": "Panel",
      "args": { "profile": ["PanelProfile"], "depth": "Thickness", "isSolid": true },
      "modifiers": [ { "nodeType": "applyMaterial", "args": { "material": "PanelMat" } } ] }
  ]
}
  • meta — the Revit template to start from and the output family name.
  • parameters — the inputs, with args.input (a default) or args.formula (computed). See Parameters & coordinates.
  • types — optional named size variants.
  • nodes — the geometry. Each node has a nodeType, a unique key, its args, and optional modifiers (such as applying a material).

Node keys must be unique within a family, and any parameter key a coordinate references must exist — otherwise generation reports an error.

Coordinate encoding

A numeric coordinate is a bare number ("depth": 45), while a quoted string is a parameter reference ("depth": "Thickness"). Writing "45" looks for a parameter named 45.

{ "width": 900 }            // hardcoded 900 mm
{ "width": "Width" }        // parameter reference
{ "width": "-HalfWidth" }   // negated parameter
{ "center": [0, "HalfHeight"] }  // 2D point: [x, y]

AI / LLM authoring

To author families by hand or generate them with an AI, /llms.txt is the complete machine-readable spec — every node, the Coord grammar, formulas, limitations, and worked examples.

📖 1 min read