// 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: L-bracket, legs 40 mm and 30 mm, 20 mm wide, 4 mm thick, one 5 mm hole in each leg
// template: bracket
// printable: Design for 3D printing was off
{
  "plan": "L-bracket, legs 40 mm and 30 mm, 20 mm wide, 4 mm thick, 90 degrees, flat on z=0. 1 hole(s) of 5 mm on each leg.",
  "issues": [
    {"type": "assumption", "msg": "The legs meet at 90 degrees.", "ref": "$leg_a"}
  ],
  "params": {
    "leg_a": 40,
    "leg_b": 30,
    "width": 20,
    "thickness": 4,
    "hole_count": 1,
    "hole_d": 5,
    "spacing": 0,
    "fillet": 0,
    "gusset": 0,
    "gusset_t": 4
  },
  "steps": [
    {
      "id": "leg",
      "op": "extrude",
      "sketch": {"points": [[0, 0], ["=$leg_b", 0], ["=$leg_b", "=$thickness"], ["=$thickness", "=$thickness"], ["=$thickness", "=$leg_a"], [0, "=$leg_a"]]},
      "height": "=$width",
      "plane": "XZ",
      "symmetric": true
    },
    {
      "id": "hbase",
      "op": "hole",
      "target": "leg",
      "face": "bottom",
      "positions": [[17, 0]],
      "diameter": "=$hole_d",
      "depth": "=$thickness+1"
    },
    {
      "id": "hvert",
      "op": "hole",
      "target": "hbase",
      "face": "left",
      "positions": [[0, 22]],
      "diameter": "=$hole_d",
      "depth": "=$thickness+1"
    }
  ],
  "result": "hvert"
}
