{
 "commands": [
  {
   "command": "parameters.add",
   "params": {
    "name": "L",
    "expression": "50 mm",
    "comment": "block length (X)"
   }
  },
  {
   "command": "parameters.add",
   "params": {
    "name": "W",
    "expression": "30 mm",
    "comment": "block width (Y)"
   }
  },
  {
   "command": "parameters.add",
   "params": {
    "name": "H",
    "expression": "15 mm",
    "comment": "block height (Z)"
   }
  },
  {
   "command": "parameters.add",
   "params": {
    "name": "slot_w",
    "expression": "10 mm",
    "comment": "slot width, centred in Y, < W"
   }
  },
  {
   "command": "parameters.add",
   "params": {
    "name": "slot_d",
    "expression": "5 mm",
    "comment": "slot depth from top, < H"
   }
  },
  {
   "command": "parameters.add",
   "params": {
    "name": "hole_d",
    "expression": "4.5 mm",
    "comment": "through-hole diameter, < slot_w"
   }
  },
  {
   "command": "parameters.add",
   "params": {
    "name": "hole_inset",
    "expression": "10 mm",
    "comment": "hole centre from each end, < L/2"
   }
  },
  {
   "command": "sketch.create",
   "params": {
    "plane": "XY",
    "name": "BlockSketch"
   }
  },
  {
   "command": "sketch.draw.dimensioned",
   "params": {
    "command": "sketch.rectangle.center",
    "params": {
     "center": [
      0,
      0
     ],
     "corner": [
      25,
      15
     ]
    },
    "dimensions": {
     "width": "L",
     "height": "W"
    }
   }
  },
  {
   "command": "sketch.constraint.coincident",
   "params": {
    "a": "p5",
    "b": "origin"
   }
  },
  {
   "command": "sketch.solve",
   "params": {}
  },
  {
   "command": "sketch.finish",
   "params": {}
  },
  {
   "command": "solid.extrude",
   "params": {
    "distance": "H",
    "name": "Block",
    "body_name": "SpacerBlock"
   }
  },
  {
   "command": "solid.box",
   "params": {
    "length": "L + 2 mm",
    "width": "slot_w",
    "height": "slot_d + 1 mm",
    "center": [
     0,
     0,
     "H - slot_d/2 + 0.5 mm"
    ],
    "operation": "cut",
    "name": "Slot"
   }
  },
  {
   "command": "solid.cylinder",
   "params": {
    "diameter": "hole_d",
    "height": "H + 2 mm",
    "base": [
     "-(L/2 - hole_inset)",
     0,
     "-1 mm"
    ],
    "operation": "cut",
    "name": "Hole"
   }
  },
  {
   "command": "solid.mirror",
   "params": {
    "features": [
     "Hole"
    ],
    "plane": "YZ",
    "name": "Hole2"
   }
  }
 ]
}