new · open source · self-correcting
Text-to-CAD
- Built for:
- Anyone who can describe a part but doesn’t want to learn CAD to make it — and who wants the file generated on their own machine, not uploaded to a service.
- Not built for:
- Sculpted, organic, or artistic geometry. This makes precise, parametric, mechanical parts — nuts, washers, brackets, standoffs — the things you actually 3D-print.
Type “a hexagonal nut, 16 mm across flats, 6 mm thick, 8 mm center hole.” A local model writes the parametric CAD, OpenSCAD renders and exports a printable STL, and a vision model looks at the result and decides whether it’s actually right. When it isn’t, the critique feeds back and the model tries again — until the part is correct. No cloud, no API keys, no human in the loop.

The problem
Describing a part is easy; modeling it is not. CAD has a steep learning curve, and the parts most people actually need — a spacer, a bracket, a nut in an odd size — aren’t worth the half hour in a modeling program. Text-to-CAD tools exist, but most ship your prompt to a cloud and hand back a mesh you can’t adjust.
The hard part isn’t getting a model to emit CAD code once — it’s getting code that compiles, exports a valid solid, and is actually the shape you asked for. Language models are confidently wrong about geometry. So the real work is the checking: catching a wrong part automatically and making the model fix it, without a person in the loop.
Decisions
fully local
Codegen runs on a local Ollama model (a code model such as qwen2.5-coder); rendering uses the OpenSCAD binary as a tool. No cloud, no API keys, no telemetry — your designs never leave the machine, and there’s no per-part cost. Parametric OpenSCAD, not a mesh, so the output is a real editable part with named dimensions.
three gates
A part has to clear three checks before it’s accepted: it compiles, it exports a valid STL, and a vision model agrees it matches the description. Any gate that fails feeds a specific critique back to the model, which rewrites the code and tries again. The loop is the product; a single generation pass would be a toy.
judge the right view
The vision gate judges a top-down orthographic render, not a glamorous isometric — because a foreshortened 3D view makes small vision models misread a hexagon as “rectangular.” On the hex nut, the first attempt was the wrong shape; the vision gate rejected it with “not hexagonal; irregular polygonal shape,” that critique fed back, and attempt two passed. Choosing the camera angle the judge can actually read is what makes the self-correction work.
System
A closed loop. Plain English goes to the model; the model writes OpenSCAD; OpenSCAD renders views and exports an STL; three gates judge the result; a failure routes a specific critique back to the model. The loop repeats until every gate passes or it gives up cleanly.
| Layer | Implementation | Purpose |
|---|---|---|
| Codegen | Ollama · code model (local) | English → parametric OpenSCAD |
| Render | OpenSCAD binary (tool) | Iso + top views · STL export |
| Inspector | Local vision model | Judges a top-down ortho render |
| Loop | Python · compile/STL/vision gates | Fail → critique → rewrite → retry |
| Surface | CLI · MIT · CI | One command · public on GitHub |
Where it stands
New and honest about it — a fresh build, public from day one under MIT with CI and tests on the loop, the codegen, and the inspector. It works end to end on real parts: the hex nut, a pulley, a washer, a standoff, a cube with a hole, each generated locally from a single sentence. What it isn’t yet is broad — it does precise mechanical geometry, not everything — but the part that matters, an agent that writes, checks, and repairs its own work with no human watching, runs today.
Acknowledgments
Text-to-CAD stands on OpenSCAD for the modeling kernel, Ollama and local code + vision models for the agentic loop, and the idea that a model allowed to generate geometry should be made to look at what it made and fix it. Source is on GitHub, MIT.
← Index