// CADL v1 - editable geometry source for sd/design (JSON + // comments).
// Edit numbers/params and rebuild: web page 'Rebuild', POST /api/build, or: python build.py part.cadl
// prompt: Flat mounting plate 60x40x5 mm with four 4.5 mm through holes, 6 mm in from each edge at the corners
// verified with design/dsl.py 2026-10-25
{
  "plan": "1. Plate: box 60x40x5 with its min corner at the origin, so x 0..60, y 0..40, z 0..5. 2. Four through holes drilled from the top face, 6 mm in from each edge (assumed).",
  "units": "mm",
  "issues": [
    {"type": "assumption", "msg": "Hole centres are 6 mm from both adjacent edges.", "ref": "$inset"}
  ],
  "params": {
    "w": 60,
    "d": 40,
    "t": 5,
    "hole_d": 4.5,
    "inset": 6
  },
  "steps": [
    {"id": "plate", "op": "box", "size": ["$w", "$d", "$t"], "anchor": "corner"},
    {
      "id": "holes",
      "op": "hole",
      "target": "plate",
      "face": "top",
      "positions": [["$inset", "$inset"], ["=$w-$inset", "$inset"], ["$inset", "=$d-$inset"], ["=$w-$inset", "=$d-$inset"]],
      "diameter": "$hole_d"
    }
  ],
  "result": "holes"
}
