Worked examples

Not sure what to type? Each example is a prompt, the CADL it builds, a preview, and an STL. Try this prompt opens the designer with that description filled in. Template parts are built by a part family, with no language model. Curated parts are CADL written for this page and checked with the same CADL engine.

Fluted control knob

knob template Design for 3D printing was off.

Diameter, height, flute count, and bore are the numbers the knob template reads. Twelve flutes and a 6 mm bore are stated, so those are built as written.

Prompt

Control knob 30 mm diameter, 15 mm tall, 12 flutes, 6 mm bore

Try this prompt

CADL

// 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: Control knob 30 mm diameter, 15 mm tall, 12 flutes, 6 mm bore
// template: knob
// printable: Design for 3D printing was off
{
  "plan": "Round knob, 30 mm across and 15 mm tall, sitting on z=0. 12 straight flutes run the full height so the grooves stay open. round bore 6 mm through.",
  "params": {
    "od": 30,
    "height": 15,
    "bore_d": 6,
    "bore_depth": 0,
    "flat": 0,
    "flutes": 12,
    "flute_d": 0.8,
    "skirt_d": 0,
    "skirt_h": 2.5,
    "setscrew_d": 0,
    "flute_w": "=max(1.35, min(1.6, 3.1416*$od/$flutes/3))"
  },
  "steps": [
    {"id": "body", "op": "revolve", "profile": [[0, 0], ["=$od/2", 0], ["=$od/2", "=$height"], [0, "=$height"]]},
    {"id": "bored", "op": "hole", "target": "body", "face": "top", "positions": [[0, 0]], "diameter": "=$bore_d"},
    {"id": "fl0", "op": "box", "size": ["=$flute_d+2", "=$flute_w", "=$height"], "at": ["=$od/2-$flute_d/2", 0, 0]},
    {"id": "fl1", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 30, "about": [0, 0, 0]},
    {"id": "fl2", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 60, "about": [0, 0, 0]},
    {"id": "fl3", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 90, "about": [0, 0, 0]},
    {"id": "fl4", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 120, "about": [0, 0, 0]},
    {"id": "fl5", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 150, "about": [0, 0, 0]},
    {"id": "fl6", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 180, "about": [0, 0, 0]},
    {"id": "fl7", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 210, "about": [0, 0, 0]},
    {"id": "fl8", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 240, "about": [0, 0, 0]},
    {"id": "fl9", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 270, "about": [0, 0, 0]},
    {"id": "fl10", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 300, "about": [0, 0, 0]},
    {"id": "fl11", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 330, "about": [0, 0, 0]},
    {
      "id": "fluted",
      "op": "cut",
      "target": "bored",
      "tools": ["fl0", "fl1", "fl2", "fl3", "fl4", "fl5", "fl6", "fl7", "fl8", "fl9", "fl10", "fl11"]
    }
  ],
  "result": "fluted"
}

Preview

Fluted control knob preview
One solid, sitting on z = 0.

Download STL Download CADL

Same kind of knob, shaped for printing

knob template Design for 3D printing was on.

D-shaft asks for a flat on the bore. With Design for 3D printing on, that flat is cut through the center of the hole so it does not end on a hairline, and the bore is open through the top.

Prompt

Control knob 30 mm diameter, 15 mm tall, 12 flutes, 6 mm D-shaft hole

Try this prompt

CADL

// 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: Control knob 30 mm diameter, 15 mm tall, 12 flutes, 6 mm D-shaft hole
// template: knob
// printable: Design for 3D printing was on
{
  "plan": "Round knob, 30 mm across and 15 mm tall, sitting on z=0. 12 straight flutes run the full height so the grooves stay open. D-shaft bore 6 mm through. Print mode: no downward face shallower than 45 degrees from vertical.",
  "issues": [
    {"type": "assumption", "msg": "D-shaft flat was not stated; 1.5 mm cut from the radius.", "ref": "$flat"},
    {"type": "assumption", "msg": "Print mode cuts the D flat through the center of the bore. A shallower flat meets the bore on a hairline edge that does not print cleanly.", "ref": "$flat"}
  ],
  "params": {
    "od": 30,
    "height": 15,
    "bore_d": 6,
    "bore_depth": 0,
    "flat": 3,
    "flutes": 12,
    "flute_d": 0.8,
    "skirt_d": 0,
    "skirt_h": 2.5,
    "setscrew_d": 0,
    "flute_w": "=max(1.35, min(1.6, 3.1416*$od/$flutes/3))"
  },
  "steps": [
    {"id": "body", "op": "revolve", "profile": [[0, 0], ["=$od/2", 0], ["=$od/2", "=$height"], [0, "=$height"]]},
    {"id": "bored", "op": "hole", "target": "body", "face": "top", "positions": [[0, 0]], "diameter": "=$bore_d"},
    {
      "id": "flat",
      "op": "box",
      "size": ["=$flat+1", "=$bore_d+2", "=$height+2"],
      "at": ["=$bore_d/2-$flat/2+0.5", 0, -1]
    },
    {"id": "dshaft", "op": "cut", "target": "bored", "tools": ["flat"]},
    {"id": "fl0", "op": "box", "size": ["=$flute_d+2", "=$flute_w", "=$height"], "at": ["=$od/2-$flute_d/2", 0, 0]},
    {"id": "fl1", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 30, "about": [0, 0, 0]},
    {"id": "fl2", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 60, "about": [0, 0, 0]},
    {"id": "fl3", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 90, "about": [0, 0, 0]},
    {"id": "fl4", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 120, "about": [0, 0, 0]},
    {"id": "fl5", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 150, "about": [0, 0, 0]},
    {"id": "fl6", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 180, "about": [0, 0, 0]},
    {"id": "fl7", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 210, "about": [0, 0, 0]},
    {"id": "fl8", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 240, "about": [0, 0, 0]},
    {"id": "fl9", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 270, "about": [0, 0, 0]},
    {"id": "fl10", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 300, "about": [0, 0, 0]},
    {"id": "fl11", "op": "rotate", "target": "fl0", "axis": "z", "angle_deg": 330, "about": [0, 0, 0]},
    {
      "id": "fluted",
      "op": "cut",
      "target": "dshaft",
      "tools": ["fl0", "fl1", "fl2", "fl3", "fl4", "fl5", "fl6", "fl7", "fl8", "fl9", "fl10", "fl11"]
    }
  ],
  "result": "fluted"
}

Preview

Same kind of knob, shaped for printing preview
One solid, sitting on z = 0.

Download STL Download CADL

Flanged bushing

bushing template Design for 3D printing was off.

Bushing selects this family. OD, ID, and long size the tube; flange OD and thick size the flange. A sleeve or spacer with those three tube sizes uses the same template.

Prompt

Flanged bushing 16 mm OD, 10 mm ID, 20 mm long, flange 24 mm OD by 3 mm thick

Try this prompt

CADL

// 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: Flanged bushing 16 mm OD, 10 mm ID, 20 mm long, flange 24 mm OD by 3 mm thick
// template: bushing
// printable: Design for 3D printing was off
{
  "plan": "Flanged bushing: outer 16 mm, bore 10 mm, 20 mm long, base on z=0. Flange 24 mm by 3 mm at the bottom.",
  "params": {
    "od": 16,
    "id": 10,
    "length": 20,
    "flange_od": 24,
    "flange_h": 3,
    "chamfer": 0
  },
  "steps": [
    {
      "id": "sleeve",
      "op": "revolve",
      "profile": [["=$id/2", 0], ["=$flange_od/2", 0], ["=$flange_od/2", "=$flange_h"], ["=$od/2", "=$flange_h"], ["=$od/2", "=$length"], ["=$id/2", "=$length"]]
    }
  ],
  "result": "sleeve"
}

Preview

Flanged bushing preview
One solid, sitting on z = 0.

Download STL Download CADL

Washer

bushing template Design for 3D printing was off.

Washer is the same family as a bushing. OD, ID, and thick are enough for a flat ring, and no flange is named, so none is added.

Prompt

Washer 20 mm OD, 8.5 mm ID, 1.5 mm thick

Try this prompt

CADL

// 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: Washer 20 mm OD, 8.5 mm ID, 1.5 mm thick
// template: bushing
// printable: Design for 3D printing was off
{
  "plan": "Sleeve: outer 20 mm, bore 8.5 mm, 1.5 mm long, base on z=0.",
  "params": {
    "od": 20,
    "id": 8.5,
    "length": 1.5,
    "flange_od": 0,
    "flange_h": 2.5,
    "chamfer": 0
  },
  "steps": [
    {
      "id": "sleeve",
      "op": "revolve",
      "profile": [["=$id/2", 0], ["=$od/2", 0], ["=$od/2", "=$length"], ["=$id/2", "=$length"]]
    }
  ],
  "result": "sleeve"
}

Preview

Washer preview
One solid, sitting on z = 0.

Download STL Download CADL

L-bracket with a hole in each leg

bracket template Design for 3D printing was off.

The two leg lengths, the width, and the thickness size the angle. One hole in each leg puts a 5 mm hole in the flat leg and one in the upright leg.

Prompt

L-bracket, legs 40 mm and 30 mm, 20 mm wide, 4 mm thick, one 5 mm hole in each leg

Try this prompt

CADL

// 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"
}

Preview

L-bracket with a hole in each leg preview
One solid, sitting on z = 0.

Download STL Download CADL

Same L-bracket, print mode

bracket template Design for 3D printing was on.

The same words, with Design for 3D printing on. The hole in the flat leg stays. The hole through the upright leg is left out, because a sideways hole leaves a flat ceiling.

Prompt

L-bracket, legs 40 mm and 30 mm, 20 mm wide, 4 mm thick, one 5 mm hole in each leg

Try this prompt

CADL

// 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 on
{
  "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. Print mode keeps the holes in the flat leg only.",
  "issues": [
    {"type": "assumption", "msg": "The legs meet at 90 degrees.", "ref": "$leg_a"},
    {"type": "assumption", "msg": "Print mode leaves the holes in the upright leg out. A cross-hole there is a flat ceiling or a hairline teardrop tip, so it is not in the printed shape. Drill them after, or turn print mode off.", "ref": "$hole_d"}
  ],
  "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"
    }
  ],
  "result": "hbase"
}

Preview

Same L-bracket, print mode preview
One solid, sitting on z = 0.

Download STL Download CADL

Box with a lift-off lid

box template Design for 3D printing was off.

80x50x30 is width, depth, and height. Wall, floor, and clearance are named, so the lid is a second solid with that gap. A box with its lid is the template that builds two solids.

Prompt

Box 80x50x30 mm with a lift-off lid, 2 mm walls and floor, 0.3 mm clearance

Try this prompt

CADL

// 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: Box 80x50x30 mm with a lift-off lid, 2 mm walls and floor, 0.3 mm clearance
// template: box
// printable: Design for 3D printing was off
{
  "plan": "Box 80x50x30 mm outer, wall 2 mm, floor 2 mm, and a separate lift-off lid (0.3 mm clearance). Two solids, both on z=0, with a gap between them. The box has an inner lip; the lid is a flat plate that sits on it.",
  "issues": [
    {"type": "assumption", "msg": "Lid thickness was not stated; 2 mm used.", "ref": "$lid_t"},
    {"type": "assumption", "msg": "Lip width was not stated; 0.7 mm used.", "ref": "$lip_w"},
    {"type": "assumption", "msg": "Lip height was not stated; 2 mm used.", "ref": "$lip_h"},
    {"type": "assumption", "msg": "The lid is a second solid, set beside the box so both sit on the bed.", "ref": "$lid_t"}
  ],
  "params": {
    "width": 80,
    "depth": 50,
    "height": 30,
    "wall": 2,
    "floor": 2,
    "lid_t": 2,
    "clearance": 0.3,
    "lip_w": 0.7,
    "lip_h": 2,
    "plug_h": 0,
    "friction": 0,
    "cavity_w": "=max(4, $width-2*$wall)",
    "cavity_d": "=max(4, $depth-2*$wall)",
    "cavity_h": "=max(2, $height-$floor-$lip_h+0.4)",
    "rabbet_w": "=max(4, $width-2*$wall+2*$lip_w)",
    "rabbet_d": "=max(4, $depth-2*$wall+2*$lip_w)",
    "gap": 4,
    "lid_w": "=max(6, $width-2*$wall+2*$lip_w-2*$clearance)",
    "lid_d": "=max(6, $depth-2*$wall+2*$lip_w-2*$clearance)",
    "lid_x": "=$width/2+$gap+$lid_w/2",
    "plug_w": "=max(4, $width-2*$wall-2*$clearance)",
    "plug_d": "=max(4, $depth-2*$wall-2*$clearance)"
  },
  "steps": [
    {"id": "outer", "op": "box", "size": ["=$width", "=$depth", "=$height"]},
    {"id": "cav", "op": "box", "size": ["=$cavity_w", "=$cavity_d", "=$cavity_h"], "at": [0, 0, "=$floor"]},
    {"id": "opened", "op": "cut", "target": "outer", "tools": ["cav"]},
    {"id": "rab", "op": "box", "size": ["=$rabbet_w", "=$rabbet_d", "=$lip_h+1"], "at": [0, 0, "=$height-$lip_h"]},
    {"id": "lipped", "op": "cut", "target": "opened", "tools": ["rab"]},
    {"id": "cap", "op": "box", "size": ["=$lid_w", "=$lid_d", "=$lid_t"], "at": ["=$lid_x", 0, 0]},
    {"id": "asm", "op": "compound", "items": ["lipped", "cap"]}
  ],
  "result": "asm"
}

Preview

Box with a lift-off lid preview
Two solids (the box and the lid), both on z = 0.

Download STL Download CADL

Spur gear

gear template Design for 3D printing was off.

Module and teeth set the pitch diameter (module times teeth). Thick is the blank and bore is the center hole. Spur gear is the phrase that selects this family.

Prompt

Spur gear, module 2, 24 teeth, 8 mm thick, 8 mm bore

Try this prompt

CADL

// 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: Spur gear, module 2, 24 teeth, 8 mm thick, 8 mm bore
// template: gear
// printable: Design for 3D printing was off
{
  "plan": "Spur gear, module 2, 24 teeth (pitch diameter 48.00 mm), 8 mm thick, pressure angle 20 degrees, on z=0. 8 mm through bore. Teeth are vertical, so the blank prints without supports.",
  "issues": [
    {"type": "assumption", "msg": "Pressure angle was not stated; 20 degrees used.", "ref": "$pressure"}
  ],
  "params": {
    "module": 2,
    "teeth": 24,
    "thickness": 8,
    "bore": 8,
    "hub_d": 0,
    "hub_h": 0,
    "pressure": 20
  },
  "steps": [
    {
      "id": "gear",
      "op": "spur_gear",
      "module": "=$module",
      "teeth": "=$teeth",
      "thickness": "=$thickness",
      "bore": 0,
      "pressure_angle_deg": "=$pressure"
    },
    {"id": "axle", "op": "hole", "target": "gear", "face": "top", "positions": [[0, 0]], "diameter": "=$bore"}
  ],
  "result": "axle"
}

Preview

Spur gear preview
One solid, sitting on z = 0.

Download STL Download CADL

Cylindrical standoff

standoff template Design for 3D printing was off.

Diameter and long size the cylinder, and through hole is the bore. 3.2 mm is a clearance size for an M3 screw. The word standoff selects this family.

Prompt

Cylindrical standoff 8 mm diameter, 15 mm long, 3.2 mm through hole

Try this prompt

CADL

// 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: Cylindrical standoff 8 mm diameter, 15 mm long, 3.2 mm through hole
// template: standoff
// printable: Design for 3D printing was off
{
  "plan": "Cylindrical standoff, 8 mm diameter, 15 mm long, on z=0. 3.2 mm through hole.",
  "params": {
    "od": 8,
    "length": 15,
    "hole_d": 3.2
  },
  "steps": [
    {"id": "body", "op": "cylinder", "diameter": "=$od", "height": "=$length"},
    {"id": "axle", "op": "hole", "target": "body", "face": "top", "positions": [[0, 0]], "diameter": "=$hole_d"}
  ],
  "result": "axle"
}

Preview

Cylindrical standoff preview
One solid, sitting on z = 0.

Download STL Download CADL

Plate with two holes

plate template Design for 3D printing was off.

60x30x5 is length, width, and thickness. Two holes and 30 mm apart place them along the long axis. Plate followed by a number is what selects this family.

Prompt

Plate 60x30x5 mm with two 4 mm holes 30 mm apart

Try this prompt

CADL

// 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: Plate 60x30x5 mm with two 4 mm holes 30 mm apart
// template: plate
// printable: Design for 3D printing was off
{
  "plan": "Plate 60x30x5 mm, centered on x and y, on z=0. 2 hole(s) of 4 mm through.",
  "params": {
    "width": 60,
    "depth": 30,
    "thickness": 5,
    "hole_count": 2,
    "hole_d": 4,
    "spacing": 30,
    "inset": 0
  },
  "steps": [
    {"id": "plate", "op": "box", "size": ["=$width", "=$depth", "=$thickness"]},
    {
      "id": "holes",
      "op": "hole",
      "target": "plate",
      "face": "top",
      "positions": [[-15, 0], [15, 0]],
      "diameter": "=$hole_d"
    }
  ],
  "result": "holes"
}

Preview

Plate with two holes preview
One solid, sitting on z = 0.

Download STL Download CADL

Chess pawn

pawn template Design for 3D printing was off.

Tall sets the total height, and the base and ball diameters are named. Stem and collar are not, so the template fills them and lists those guesses. Design for 3D printing is off, so the ball and collar keep their round overhangs.

Prompt

Chess pawn 42 mm tall with a 32 mm diameter base and an 18 mm diameter ball

Try this prompt

CADL

// 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: Chess pawn 42 mm tall with a 32 mm diameter base and an 18 mm diameter ball
// template: pawn
// printable: Design for 3D printing was off
{
  "plan": "Chess pawn: one revolve of the [r, z] silhouette about Z. The ball overlaps the collar. The groove is a notch.",
  "issues": [
    {"type": "assumption", "msg": "Base height was not stated; 7 mm used.", "ref": "$base_h"},
    {"type": "assumption", "msg": "Groove depth and width was not stated; 1 mm used.", "ref": "$groove"},
    {"type": "assumption", "msg": "Lower collar diameter was not stated; 12 mm used.", "ref": "$lower_collar_d"},
    {"type": "assumption", "msg": "Stem diameter was not stated; 7 mm used.", "ref": "$stem_d"},
    {"type": "assumption", "msg": "Collar diameter under the ball was not stated; 14 mm used.", "ref": "$upper_collar_d"}
  ],
  "params": {
    "base_d": 32,
    "base_h": 7,
    "groove": 1,
    "lower_collar_d": 12,
    "stem_d": 7,
    "upper_collar_d": 14,
    "ball_d": 18,
    "height": 42,
    "foot": 1.2,
    "band": 1.6,
    "flare": 3,
    "overlap": 1.1,
    "collar_h": 1.6,
    "z_center": "=$height-$ball_d/2",
    "overlap_used": "=min($overlap, $ball_d/4)",
    "z_join": "=$height-$ball_d+$overlap_used",
    "z_collar": "=$z_join-$collar_h",
    "meet_r": "=sqrt(($ball_d/2)*($ball_d/2)-($ball_d/2-$overlap_used)*($ball_d/2-$overlap_used))"
  },
  "steps": [
    {
      "id": "pawn",
      "op": "revolve",
      "profile": [[0, 0], ["=$base_d/2", 0], ["=$base_d/2", "=$foot"], ["=$base_d/2-$groove", "=$foot"], ["=$base_d/2-$groove", "=$foot+$groove"], ["=$base_d/2", "=$foot+$groove"], ["=$lower_collar_d/2", "=$base_h"], ["=$lower_collar_d/2", "=$base_h+$band"], ["=$stem_d/2", "=$base_h+$band+$flare"], ["=$stem_d/2", "=$z_collar"], ["=$upper_collar_d/2", "=$z_collar"], ["=$upper_collar_d/2", "=$z_join"], ["=$meet_r", "=$z_join"], {"arc_through": ["=$ball_d/2", "=$z_center"], "to": [0, "=$height"]}]
    }
  ],
  "result": "pawn"
}

Preview

Chess pawn preview
One solid, sitting on z = 0.

Download STL Download CADL

Chess pawn, shaped to print

pawn template Design for 3D printing was on.

The same sizes, with Design for 3D printing on. The groove becomes a V and the underside of the collar slopes at 45 degrees or steeper, so the pawn can print without supports. The stated base, ball, and height stay.

Prompt

Chess pawn 42 mm tall with a 32 mm diameter base and an 18 mm diameter ball

Try this prompt

CADL

// 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: Chess pawn 42 mm tall with a 32 mm diameter base and an 18 mm diameter ball
// template: pawn
// printable: Design for 3D printing was on
{
  "plan": "Chess pawn: one revolve of the [r, z] silhouette about Z. Design for 3D printing: the groove is a V-notch and the collar underside is a cone at 45 degrees or steeper into the stem, with the collar's top edge left rounded. The ball meets the collar where the sphere is still 45 degrees or steeper, so the pawn prints without supports. Stated diameters and the total height are unchanged.",
  "issues": [
    {"type": "assumption", "msg": "Base height was not stated; 7 mm used.", "ref": "$base_h"},
    {"type": "assumption", "msg": "Groove depth and width was not stated; 1 mm used.", "ref": "$groove"},
    {"type": "assumption", "msg": "Lower collar diameter was not stated; 12 mm used.", "ref": "$lower_collar_d"},
    {"type": "assumption", "msg": "Stem diameter was not stated; 7 mm used.", "ref": "$stem_d"},
    {"type": "assumption", "msg": "Collar diameter under the ball was not stated; 14 mm used.", "ref": "$upper_collar_d"}
  ],
  "params": {
    "base_d": 32,
    "base_h": 7,
    "groove": 1,
    "lower_collar_d": 12,
    "stem_d": 7,
    "upper_collar_d": 14,
    "ball_d": 18,
    "height": 42,
    "foot": 1.2,
    "band": 1.6,
    "flare": 3,
    "overlap": 1.1,
    "collar_h": 1.6,
    "z_center": "=$height-$ball_d/2",
    "overlap_used": "=min($overlap, $ball_d/4)",
    "z_join": "=$height-$ball_d+$overlap_used",
    "z_collar": "=$z_join-$collar_h",
    "meet_r": "=sqrt(($ball_d/2)*($ball_d/2)-($ball_d/2-$overlap_used)*($ball_d/2-$overlap_used))",
    "slope": 0.98,
    "join_deg": 40,
    "cot": "=1/$slope",
    "r_base": "=$base_d/2",
    "r_ball": "=$ball_d/2",
    "r_up": "=$upper_collar_d/2",
    "r_stem": "=$stem_d/2",
    "r_low": "=$lower_collar_d/2",
    "v_depth": "=min($groove, max(0.05, ($base_h-$foot-0.05)/(2*$cot)))",
    "r_groove": "=$r_base-$v_depth",
    "z_v_bot": "=$foot+$v_depth*$cot",
    "z_v_top": "=$foot+2*$v_depth*$cot",
    "r_meet": "=$r_ball*cos($join_deg)",
    "z_meet": "=$z_center-$r_ball*sin($join_deg)",
    "neck_drop": "=max(0, $r_meet-$r_up)*$cot",
    "z_lip": "=$z_meet-$neck_drop",
    "rho": "=min(0.7, $collar_h*0.35, max(0, $r_up-$r_meet-0.25)*0.5)",
    "z_cone_top": "=$z_lip-$collar_h",
    "z_round0": "=$z_lip-$rho",
    "z_cone_bot": "=$z_cone_top-max(0, $r_up-$r_stem)*$cot",
    "r_round": "=$r_up-$rho",
    "r_arc": "=$r_round+$rho*cos(45)",
    "z_arc": "=$z_round0+$rho*sin(45)",
    "z_low_cone": "=max($z_v_top, $base_h-max(0, $r_low-$r_base)*$cot)",
    "z_stem_cone": "=max($z_v_top, $base_h-max(0, $r_stem-$r_base)*$cot)"
  },
  "steps": [
    {
      "id": "pawn",
      "op": "revolve",
      "profile": [[0, 0], ["=$r_base", 0], ["=$r_base", "=$foot"], ["=$r_groove", "=$z_v_bot"], ["=$r_base", "=$z_v_top"], ["=$r_low", "=$base_h"], ["=$r_low", "=$base_h+$band"], ["=$r_stem", "=$base_h+$band+$flare"], ["=$r_stem", "=$z_cone_bot"], ["=$r_up", "=$z_cone_top"], ["=$r_up", "=$z_lip"], ["=$r_meet", "=$z_meet"], {"arc_through": ["=$r_ball", "=$z_center"], "to": [0, "=$height"]}]
    }
  ],
  "result": "pawn"
}

Preview

Chess pawn, shaped to print preview
One solid, sitting on z = 0.

Download STL Download CADL

Flange with a bolt circle

curated CADL Design for 3D printing was off.

Diameter and thick size the disc, the center bore is named, and six holes on a 44 mm bolt circle sit on a 22 mm radius. This is not a template: the CADL was written for the example and checked with the CADL engine.

Prompt

Round flange 60 mm diameter, 8 mm thick, 20 mm center bore, six 5.5 mm holes on a 44 mm bolt circle

Try this prompt

CADL

// 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: Round flange 60 mm diameter, 8 mm thick, 20 mm center bore, six 5.5 mm holes on a 44 mm bolt circle
// curated: written for this example; the language model is not called
// printable: Design for 3D printing was off
{
  "plan": "1. Disc 60 mm diameter, 8 mm thick, base center at the origin, z 0..8. 2. 20 mm bore through from the top at (0, 0). 3. Six 5.5 mm holes from the top on a 44 mm bolt circle (radius 22), first hole on +X.",
  "units": "mm",
  "params": {
    "od": 60,
    "t": 8,
    "bore": 20,
    "hole": 5.5,
    "bcd": 44
  },
  "steps": [
    {"id": "disc", "op": "cylinder", "diameter": "$od", "height": "$t"},
    {"id": "bore", "op": "hole", "target": "disc", "face": "top", "positions": [[0, 0]], "diameter": "$bore"},
    {
      "id": "bolts",
      "op": "hole",
      "target": "bore",
      "face": "top",
      "positions": {"polar": {"count": 6, "radius": "=$bcd/2", "center": [0, 0], "start_deg": 0}},
      "diameter": "$hole"
    }
  ],
  "result": "bolts"
}

Preview

Flange with a bolt circle preview
One solid, sitting on z = 0.

Download STL Download CADL

Block with a fillet and a chamfer

curated CADL Design for 3D printing was off.

50x30x12 is the block. Rounded vertical corners is a fillet on the vertical edges, and chamfer on the top edges is the chamfer size. The words say which edges.

Prompt

Block 50x30x12 mm with 4 mm rounded vertical corners and a 1.5 mm chamfer on the top edges

Try this prompt

CADL

// 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: Block 50x30x12 mm with 4 mm rounded vertical corners and a 1.5 mm chamfer on the top edges
// curated: written for this example; the language model is not called
// printable: Design for 3D printing was off
{
  "plan": "1. Block 50x30x12, base center at the origin, z 0..12. 2. Fillet the four vertical edges, radius 4 mm. 3. Chamfer the top edges 1.5 mm.",
  "units": "mm",
  "params": {
    "w": 50,
    "d": 30,
    "h": 12,
    "fillet": 4,
    "chamfer": 1.5
  },
  "steps": [
    {"id": "block", "op": "box", "size": ["$w", "$d", "$h"]},
    {"id": "rounded", "op": "fillet", "target": "block", "radius": "$fillet", "edges": "vertical"},
    {"id": "top", "op": "chamfer", "target": "rounded", "distance": "$chamfer", "edges": "top"}
  ],
  "result": "top"
}

Preview

Block with a fillet and a chamfer preview
One solid, sitting on z = 0.

Download STL Download CADL

Funnel from one revolved profile

curated CADL Design for 3D printing was off.

One revolve of a closed profile in radius and height. The 1.5 mm wall is the thickness perpendicular to the cone, so the inner line is not a flat 1.5 mm step in x. The spout length is the part the prompt left open.

Prompt

Funnel: 70 mm top diameter, 12 mm spout, 60 mm tall overall, 1.5 mm wall, made by revolving one profile

Try this prompt

CADL

// 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: Funnel: 70 mm top diameter, 12 mm spout, 60 mm tall overall, 1.5 mm wall, made by revolving one profile
// curated: written for this example; the language model is not called
// printable: Design for 3D printing was off
{
  "plan": "1. Revolve one closed wall profile about Z. Points are [radius, height]. 2. Spout wall from r 6 to 7.5 for z 0..25 (12 mm spout, 1.5 mm wall). 3. Outer cone to r 35 at z 60 (70 mm top). 4. Inner cone parallel, 1.5 mm away measured perpendicular to the wall.",
  "units": "mm",
  "issues": [
    {"type": "assumption", "msg": "The spout is the bottom 25 mm of the 60 mm height; the cone is the rest.", "ref": "funnel"}
  ],
  "steps": [
    {"id": "funnel", "op": "revolve", "profile": [[6, 0], [7.5, 0], [7.5, 25], [35, 60], [33.09, 60], [6, 25.52]]}
  ],
  "result": "funnel"
}

Preview

Funnel from one revolved profile preview
One solid, sitting on z = 0.

Download STL Download CADL

Wall hook

curated CADL Design for 3D printing was off.

The bent strip is one sketch, extruded by the 30 mm width. The 3 mm is the strip thickness, not the extrusion length. The screw hole is on the back face, 30 mm up; centered across the width is the guess.

Prompt

Wall hook: 30 mm wide, 3 mm thick strip, 40 mm tall back plate, 25 mm arm out the front at the bottom with a 10 mm upturned tip, one 4 mm screw hole through the back plate 30 mm up

Try this prompt

CADL

// 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: Wall hook: 30 mm wide, 3 mm thick strip, 40 mm tall back plate, 25 mm arm out the front at the bottom with a 10 mm upturned tip, one 4 mm screw hole through the back plate 30 mm up
// curated: written for this example; the language model is not called
// printable: Design for 3D printing was off
{
  "plan": "1. J cross-section on the YZ plane, extruded 30 mm in X from x=-15. 2. Back plate y -3..0, z 0..40. 3. Arm out the front to y=-25, tip up to z=10, strip 3 mm thick. 4. 4 mm screw hole from the back face at (x, z)=(0, 30).",
  "units": "mm",
  "issues": [
    {"type": "assumption", "msg": "Screw hole centered across the 30 mm width.", "ref": "screw"}
  ],
  "params": {
    "t": 3
  },
  "steps": [
    {
      "id": "hook",
      "op": "extrude",
      "sketch": {"points": [[0, 0], [-25, 0], [-25, 10], ["=-25+$t", 10], ["=-25+$t", "$t"], ["=-$t", "$t"], ["=-$t", 40], [0, 40]]},
      "height": 30,
      "plane": "YZ",
      "at": [-15, 0, 0]
    },
    {"id": "screw", "op": "hole", "target": "hook", "face": "back", "positions": [[0, 30]], "diameter": 4}
  ],
  "result": "screw"
}

Preview

Wall hook preview
One solid, sitting on z = 0.

Download STL Download CADL