I'll have to add this to my backlog of experiments to try when I have unused tokens near a reset...
If you just need to tweak the dimensions in the script, or are satisfied with describing the changes to the LLM and having it modify the script, there isn't much difference in practice between a generated OpenSCAD script and a Blender python script.
https://github.com/joewalnes/toybrick
LLMs are excellent at building OpenSCAD models. The tutorial (written in the before-times) will help understanding of the key concepts of OpenSCAD: primitives, transformations, and constructive solid geometry.
The most important thing about OpenSCAD for programmers to remember is that it looks as if you are programming but really you are describing geometry and objects so things like variables and such do not quite work in the way you would expect from a programmers point of view.
I bought a 3D printer (which is basically simpler and more reliable than a 2D inkjet printer by now: it's send the file, put the filament, and 3D print and it just works) recently and already fixed shitload of stuff around the house with 3D printed parts.
I even did "print in place" pieces where you add a pause a a certain layer, insert "stuff" (like say a 3D metal angle) into your print, then finish your print. Effectively creating parts that are both plastic and metal.
Now the language itself in OpenSCAD is kinda really bad: you can define variables inside of other functions and then use them everywhere. You can redefine already defined variables and you'll get zero warning. The language itself is really pretty WTF.
But you get modelling for free as a programmer. And LLMs are okay'ish at it for simple stuff.
I'd recommend people to use the BOSL2 library for OpenSCAD:
https://github.com/BelfrySCAD/BOSL2/wiki
It's really not hard.
If you love programming and like to DIY stuff around the house, buying a 3D printer and learning some OpenSCAD is a no-brainer.
OpenSCAD ain't the only option: many people like Fusion (for example). But as I'm a dev, OpenSCAD just feels natural to me.
The more powerful option is something built on the open-source Open Cascade geometry kernel: FreeCAD, cadquery, or build123d. This also gives you interop with the broader CAD ecosystem by enabling you to import and export STEP files. (Your favorite LLM can advise you on or drive these options as well.)
The awful thing about OpenSCAD is that one's capabilities in it are bounded by one's fluency in using math to place or stretch cubes, spheres, and cylinders.
but what made me use scad was reliability. i knew the time i put writting in vim would translate (heh) into a viable stl file i could send to manufacturing. while with both other options half the time was dealing with bugs and crashes and bad exports.
I made a rust-implementation of openscad called openrscad (https://openrscad.com). It still has some rough edges, but runs quite fast both on desktop and in the browser
It's not as bad as it looks, it's all automatic except adding colors which takes about 2 minutes.
pdntspa•54m ago