Home / Guides

How to design a part with an LLM (OpenSCAD and CadQuery)

Language models are good at writing code, and code-based CAD turns that into physical parts. This guide gives you a prompt structure that produces files you can actually send to a factory.

1. Start from a measured spec

Paste your measurements with units and tolerances. Never describe dimensions loosely ("about as wide as a door"). If a number is uncertain, say so explicitly in the prompt.

2. State the process

Tell the model whether the part will be laser cut, machined or printed, and which material and thickness. This changes bend radii, minimum hole sizes and wall thickness.

3. Demand parameters

Ask for every dimension to be a named variable at the top of the file, so you can change a measurement without touching geometry code.

4. Ask for an assumptions list

Have the model list what it assumed. Review each assumption against your measurements before running the code.

5. Export and verify

Export STEP, DXF or STL, open the result in a viewer and measure it against the spec. Only then move on to a manufacturability check.

Read the playbook

Get new playbooks and design drops

One short email when we publish a new guide or a new parametric design. No spam, unsubscribe any time.