Why OpenSCAD is the perfect language for an AI to write CAD in

Of all CAD formats, OpenSCAD is the one language models write best. Text, declarative, parametric, deterministic. Here is why SpeakCAD chose it and what it means for you.
3 September 2026 · 2 min readengineeringopenscad

Large language models write text

An LLM predicts tokens. It is at its best producing structured text it has seen a lot of: code. Traditional CAD stores models as binary feature trees (Fusion, SolidWorks) or as B-rep kernels behind a GUI. There is nothing for a language model to write. OpenSCAD is the opposite: a small, declarative, text-based language with thirty years of examples on the web.

Declarative and compositional

An OpenSCAD program says what the shape is, not how to click to get it:

javascript
difference() {
cube([60, 40, 20], center = true);
cylinder(d = 6.4, h = 30, center = true);
}

The AI can reason about that the way it reasons about any code: compose modules, factor parameters, name things. Edits are local and predictable.

Deterministic compilation

The same program always produces the same mesh. That property is what lets SpeakCAD offer a fair credit rule: we can compare two versions of a design objectively (code similarity, volume, bounding box) and decide whether an edit is a small fix or a new part.

Fast enough for the browser

The modern OpenSCAD builds use the Manifold geometry kernel, which turned minutes-long renders into sub-second ones. Compiled to WebAssembly, the whole engine runs in a browser tab. There is no server rendering, no GPU cost, no queue, and your model never has to leave your machine to be previewed.

Where OpenSCAD falls short, and how we handle it

  • No fillets primitive. The AI builds fillets with hulls of cylinders and spheres, or with 2D offsets before extruding.
  • No libraries in the browser. BOSL2 and MCAD are not available, so the system prompt forbids them and the AI writes its own small helpers.
  • Rendering cost of minkowski(). We steer the AI away from it on complex shapes.
  • Fonts. Only a default font ships in the WASM build, so text is kept simple.

The bonus: it stays editable

Every SpeakCAD model stays a parametric program in the app: change any dimension later without starting over. If you already write OpenSCAD, upload your .scad and let the AI do the boring edits.

Your next print is a few taps or one sentence away

Shape a part with the free hand tools on your phone or computer, or describe it and let the AI build it, then download an STL, or G-code sliced for your printer. A free account brings the hand tools and their files, plus your first AI part on us (some accounts confirm it with a card first, nothing charged that day); then the AI runs on credits, from Maker at $7.99 a month for 50 credits, or Pro from $14.99 a month, cancel anytime. Nothing to install. Not sure yet? Shape a real part in the live demo first, no account needed.