AI OpenSCAD generator that renders and checks its own code
Asking a general chatbot for OpenSCAD code usually ends with syntax errors, parts floating in mid-air or a hole that is 2 mm too small. FitPrint closes the loop: the AI writes OpenSCAD, your browser compiles it with OpenSCAD (WebAssembly, Manifold backend), measures the result and sends any error or mismatch back to the AI until the model passes.
- Language
- OpenSCAD with a verified helper library (fp_*)
- Rendering
- In the browser (OpenSCAD WASM, Manifold)
- Customizer
- Top-level parameters with ranges become sliders
- Download
- .scad (self-contained, library included) and STL
What the generated code looks like
Every model starts with customizer parameters (`knob_d = 35; // [20:0.5:60] Knob outer diameter`), followed by modules per component and a final fp_fit block that places the real objects the part works with. The downloaded .scad file includes the helper library, so it opens unchanged in desktop OpenSCAD and the MakerWorld / Thingiverse customizers.
Automatic checks on every render
- Compile errors are fed back with line numbers.
- The measured bounding box must match the size the AI planned.
- Use simulation: the real object (phone, screw, pipe) must not collide with the part, must touch it, must be insertable and must not fall through.
- Floating, disconnected pieces are detected.
- IKEA SKADIS accessories are tested against a virtual pegboard.
Why not just ask ChatGPT?
General chatbots cannot see or measure what their code produces. They frequently confuse axes, forget clearances and produce geometry that does not touch. FitPrint renders and measures every version and gives the AI concrete feedback (“the phone collides with the back support by 120 mm³ at x=12, y=40”).
Frequently asked questions
Can I use the OpenSCAD code commercially?
The parts you generate are yours to use. The bundled helper library is included in the download; OpenSCAD itself is GPL software.
Does it support BOSL2?
Not currently — FitPrint uses plain OpenSCAD plus its own verified library so every file renders in the browser and in any OpenSCAD install.
Can I paste my own OpenSCAD code?
You can describe changes to a generated model in chat; editing arbitrary existing code is best done in desktop OpenSCAD.
Related
Updated · Generated parts are a starting point — always test-fit before relying on a part.