This has been easy with OpenSCAD for a long time. I have made lots of cool, complex models this way. I built a repo of the prompts I use to show the llm how to do this and it includes many of the models I've created this way...
This has been easy with OpenSCAD for a long time. I have made lots of cool, complex models this way. I built a repo of the prompts I use to show the llm how to do this and it includes many of the models I've created this way...
OpenSCAD has almost zero crossover with B-rep modelling ('true' CAD, what this apparently is), though.
how hard it is ? with AI prevalent, how long ? any pointers to start from ?
If you want something based on B-Rep, look at projects that use opencascade under the hood, as that is one of the only B-Rep CAD kernels available which is free and open source. Some examples would be CADQuery, CascadeStudio, or RepliCAD.
OpenSCAD uses CSG which is generally better. Easy to convert CSG to BREP. Cant generally do the opposite
It's easy to convert because CSG is a small subset of what BREP can do.
It's analogous to "all squares are rectangles, but not all rectangles are squares" (squares=CSG, rectangles=BREP)
CSG by itself isn't suitable for most CAD use-cases.
How can I convert openSCAD models to true STEP files? As in no meshes. I Literally have wanted that for years.
You need to use https://github.com/smurfix/buildscad which can convert OpenSCAD to Build123d, then you can export a STEP file. It has a few limitations, but for simple OpenSCAD files it can generate an equivalent representation in OpenCASCADE.
Yeah, that fails for even moderately complex models...
Same. Working with an LLM and OpenSCAD has been totally painless.
I’ve been using cadquery and build123 with Claude code and I find it incredibly painful.
What is your workflow for llm integration to openscad?
I just ask it for what I’m looking for (doing very simple “spare part” level at home 3d printing, nothing fancy or elaborate) and it gives me a starting point. Then I sometimes just edit the scad code by hand, and some times I ask the AI to revise, sometimes a mix (many iterations).
For very simple geometries it works great, but it very quickly becomes apparent that there’s a bit of a disconnect between “LLM views image” and “LLM emits scad that looks like that image” when it comes to anything non-trivial.
Still gives me a starting point I can mess with, which is great since I have zero CAD training or experience.
(I’m not the commenter you replied to)
Tell it to use the existing libraries. https://openscad.org/libraries.html, in particular BOSL2
I've one shotted a light saber hilt with threaded parts and it worked flawlessly.
Not OP but I just ask Claude Code to make me an openscad file. If I need changes I ask for them in plain english. If you are specific, it's not the quickest loop but it works. I usually ask it to parameterize the model enough so that I can quickly print small prototypes in my 3d printer. Once I am happy with the mini version I print the full-size model.
I'm sorry, but which ones of these are complex? I'm looking through some [1] [2] [3] of the output PNGs and they look trivial. Like, my first 3d model in Blender trivial.
In comparison, here's one of my recent designs: what I would still call a very simple case [4]. And it's not like I'm a trained mechanical engineer working commercially, this is stuff I design in my spare time as a programmer.
[1] - https://github.com/cjtrowbridge/vibe-modeling/blob/main/outp...
[2] - https://github.com/cjtrowbridge/vibe-modeling/blob/main/outp...
[3] - https://github.com/cjtrowbridge/vibe-modeling/blob/main/outp...
[4] - https://object.ceph-eu.hswaw.net/q3k-personal/fe3e54e6df604a...
What is the inference overhead on this