Show HN: ChatToSTL – AI text-to-CAD for 3D printing
I'm a beginner at CAD so I built an app that does it for me ;) Describe a part and ChatToSTL writes the OpenSCAD code, shows a live render with size sliders, then exports the STL/3MF file. Because the output is parametric, it's easy to modify (unlike mesh models like Shap-E or DreamFusion).
Try it (needs your own OpenAI key): https://huggingface.co/spaces/flowfulai/ChatToSTL
How it works: Text prompt → o4-mini generates OpenSCAD code → live render + sliders → refine in chat → export.
Examples & Code:
* Walkthrough + real prints (bowl, hook, box, door stop): https://medium.com/@nchourrout/vibe-modeling-turning-prompts...
* 90-sec demo: https://www.youtube.com/watch?v=ZK_IDaNn1Mk
* MIT repo: https://github.com/nchourrout/chat-to-stl
Current limitations (it's not replacing Fusion 360 anytime soon):
- Simple shapes only. Even a mug can end up with a misplaced handle
- Works best with CAD-style language ("extrude 5mm")
- AI can't see the render, so no self-correction yet
I'm particularly interested in feedback on improving the 3D generation quality: should I add vision feedback so that it can self critique? use CADQuery instead of OpenSCAD? use a different model?Thanks! Nico
I prototyped something like this with build123d for Python and Cursor + OCP VSCode plugin.
Build123d is too new with too little examples out there, unlike OpenSCAD. I can only get it to generate good code with largr reasoning models that access the latest docs. No fast iteration for build123d yet.
Yeah, I picked openscad since it's well known to LLMs, though the downside is that it's not a python lib. For visualization I used trimesh to load the STL data and then plotly to display it.