Be aware that the way OpenSCAD works (CSG) makes a lot of things difficult compared to "normal" CAD programs. A lot of common operations, such as arbitrary fillets on various edges, are simply hard to express or do.
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.)
That's because you are thinking in the way you would with conventional cad systems, you are doing your operations sequentially a bit like a sculptor would: take a blank and then remove bits piece by piece. The trick to working effectively with OpenSCAD is to generate what you want, not to iteratively chip away at something.
I have found that a combination of the two approaches works best for me. In some cases it is easiest and most practical to combine (union) shapes to get to what you want, and in others it easiest to subtract (difference or intersect).
to be a bit tautological, openscad is nice but only for the things openscad is nice for. I prefer freecad for almost everything except highly parametric shapes. Plus you can do openscad inside of freecad.
The great thing about OpenSCAD is that it makes modeling using cubes, spheres, cylinders, and placing or stretching them mathematically easy.
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.
i did ton of projects in open scad in the past (8+yrs ago), even having access to freecad and solidworks. I was even sending patches to some 2d features on freecad.
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.
but how did i miss some convenience tools indeed. most could be solved with opensource methods (e.g. bevel, joiners with easing, threads)
To be fair, arbitrary fillets/blends on edges is a hard problem in general for Parasolid/ACIS because you are trying to mutate arbitrary topology, essentially guessing vertices/edges/faces and trying to stitch the back together.
This is true, but in things like OnShape I can do it with two clicks whereas in OpenSCAD it's always at least 20 minutes of thinking and trying out.
OpenSCAD is super cool and my go-to for simple things, but for anything more involved than a cube or cylinder with some cutouts I tend to revert to "normal" CAD programs.
Concur. It's worth explaining this, as someone new to CAD would get the impression the various tools in CAD are on even ground, and may assume "I know programming, so OpenSCAD sounds like the right choice". I would love some day for programmatic and/or free/cheap CAD to be competitive, but we're not there. Solidworks, Fusion, Inventor etc still outclass FreeCAD, which outclasses OpenSCAD.
I agree with your ordering of the various programs out there but FreeCAD 26.3 is now available as a release candidate with a wonderful collection of improvements. I'd think for many people, FreeCAD is now "good enough" for a lot of things. I'm building a virtual pinball cabinet and the whole thing is modeled in FreeCAD.
Not an OpenCascade wrapper, it's based off my own experimental BREP geometry kernel. So, fillets/chamfers work, booleans works fairly robustly, surfacing, sheet metal, etc all works decently, it exports STEP AP242 by default.
Haven't had time to get the AIs to write a more up to date documentation and polish the language server. Not the easiest thing to use right now, so, using it through Codex/Claude Code or CLI is probably the easiest way to get started.
Still working on the webUI currently, in case someone want to DIY the UI. Note that the WASM compilation path is still unoptimized and way slower than the RyuJIT C# compilation though.
Not even two years ago writing your own BREP kernel was considered to be out of reach for even the most determined dedicated hardcore engineering teams that weren't extremely well funded. Now, it seems tractable and may finally get us out of the dependence on proprietary kernels that has plagued this industry for decades.
Yeah, I know. I started this project earlier this year because of my own frustration with the software ecosystem and that the major CAD vendors is charging thousands of dollar to add STEP 242 support and because of proprietary lock-in and locking everything behind cloud, and was trying to see if I can accomplish this with AI.
I'm not going to pretend this is easy: I actually quit multiple times for this project because I ran into the same walls that everyone else ran to: arbitrary 3D boolean operations is HARD,(Surprisingly, I actually didn't have that much trouble with fillets/chamfers because I kept them pretty bounded) and the approach I've finally taken to solve it is pretty insane. Essentially, the final architecture is more like "LLVM for 3D objects" compiler stack than it is traditional BREP kernel. Would love to talk about the technical deep dives if people want to hear it.
Also, feel free to write UI wrappers around it, because I'm pretty bad at UI design myself.
The one you want is the experimental build, it is way faster to the point that 'preview mode' should be disabled. I use OpenSCAD a lot, it ties right into my workflow and plays nice with versioning and re-using modules from one project to another. Over time I've built up a nice library of parts that I can quickly customize for whatever it is that I'm building. Latest project: pick-and-place machine modification for Prusa MK3 3D printers (an interesting challenge, to put it mildly), now working on some robotics stuff.
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.
> things like variables and such do not quite work in the way you would expect from a programmers point of view.
I'm a novice at OpenSCAD still despite doing a bunch of small projects with it recently. Can you give an example of this happening? Most of the confusing stuff so far has been geometry breaking my brain and not some kind of scope issue.
> 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.
To put it another way, it's a purely functional language in a very strict way that takes some getting used to.
For these eternal Fillet-Whiners: Antigravity made simple Blender-tool that rounds all edges in STL-file.
Sharp edges never look good in print and avoiding them feels often like too much extra work.
I have been using OpenSCAD to create cool geometric designs for 3D printing on fabric, with great results. The functional model is likely unfamiliar to most developers, but I have found that I can be efficient and productive with it.
I have built FluidCAD[1] to overcome the issues of CAD by code, less mental effort to design by providing visual guidance. Slowly it became more of a hybrid CAD experience (mouse or code driven), almost all features now can be done by mouse and the code is generated for you. It'll pick the right selection filters for you.
Eventually, someone will note that its programming model limits variables and so forth --- for folks who want a more traditional language choice there are a number of options, notably for Python:
I've been using Opus 5.5 to write openscad models for me for the past week, with great success. I wanted to expand the project Open Source Watch Winder [0] to have 8 watches, with gears instead of pulleys, and in little back and forth I have a version I've started printing. [1]
It would be interesting to see a head to head comparison of frontier LLMs building models with OpenSCAD, Blender scripting, and Fusion MCP. My intuition would be that blender winds up the best for the immediate result due to training data prevalence and RL tuning, but the concise nature of OpenSCAD could help.
I'll have to add this to my backlog of experiments to try when I have unused tokens near a reset...
Blender gives you a mesh that isn't parameterized. Not particularly useful for making dimensional changes outside of eyeballing everything. An LLM isn't going to reliably hit your dimension targets so tweaks will be necessary.
Yeah, that's what I meant by "immediate result", if you need to edit the generated model by hand it will be hard to beat having the model and timeline available in Fusion after using Fusion MCP.
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.
I created an (unpublished) MCP for a CAD that didn’t have one before and LLMs are just fine at it. It looks like they can apply their higher level training across interfaces.
Note that the current release version is very old, I strongly recommend downloading the nightly version and turning on the manifold geometry solver in settings as it's much faster.
How does OpenSCAD type stuff play with simulation, in general. (If at all?)
I’m thinking of something like finite element analysis… but, I guess since the shapes in OpenSCAD are defined through this constructive geometry system, can things be better/more mathematically defined general purpose “discretize the PDEs over my mesh” type solutions?
Normal finite elemts does not care. The mesh ist just put on your 3d body that can be an stl or a step or whatever. The FEM only knows the nodes and nothing else. The mesh geometry is completely separate from the CAD file.
Now there is a method called Isogeometric Analysis (IGA) that was meant to improve this. It uses NURBS functions (just like CAD) for the shape functions of traditional FEM. The idea was that now, if you have NURBS describing the CAD geometry you can skip meshing and just directly calculate on the real geometry.
But it did not catch on. The reason being basically, as far as I remember, was that most CAD geometries of interest are not pure NURBS. But they are operations of NURBS (think cube minus some other cube - trimmed surfaces). And IGA has problems with that.
This is a problem that openSCAD will probably also not be able to overcome. Maybe at times it might be easier to create NURBS geometries without trimmed surfaces. But most probably that cannot be done in most cases of real world significance.
Ah, that makes sense. I think Isogeometric Analysis was the idea I was circling (the though process being “of course you can always export to a mesh, but the OpenSCAD model seems to encode more designer intent so why not use that for simulations directly”). I’ll have to read up on what was tried and why it didn’t catch on. Thanks!
I love OpenSCAD. Have been a power user for years. It's so great asking LLMs to make 3d models in openscad.
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
Seconded. OpenSCAD is a bit tedious to use from scratch but claude is pretty decent at generating the code. It can't render the script though so it tends to make silly mistakes
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.
OpenSCAD is amazing for those who know nothing about 3D but know about programming.
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:
As a programmer, I second this. Systems like Blender are inscrutable to me, but in OpenSCAD I just write some loops. I get what I want and it's easy to tweak.
The nightly builds for this are so much better. When are they going to merge the nightlies into a new mainline release? The last one showing 2021 isn't the best look...
Be aware that the way OpenSCAD works (CSG) makes a lot of things difficult compared to "normal" CAD programs. A lot of common operations, such as arbitrary fillets on various edges, are simply hard to express or do.
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.)
That's because you are thinking in the way you would with conventional cad systems, you are doing your operations sequentially a bit like a sculptor would: take a blank and then remove bits piece by piece. The trick to working effectively with OpenSCAD is to generate what you want, not to iteratively chip away at something.
I have found that a combination of the two approaches works best for me. In some cases it is easiest and most practical to combine (union) shapes to get to what you want, and in others it easiest to subtract (difference or intersect).
1 reply →
to be a bit tautological, openscad is nice but only for the things openscad is nice for. I prefer freecad for almost everything except highly parametric shapes. Plus you can do openscad inside of freecad.
The great thing about OpenSCAD is that it makes modeling using cubes, spheres, cylinders, and placing or stretching them mathematically easy.
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.
2 replies →
i did ton of projects in open scad in the past (8+yrs ago), even having access to freecad and solidworks. I was even sending patches to some 2d features on freecad.
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.
but how did i miss some convenience tools indeed. most could be solved with opensource methods (e.g. bevel, joiners with easing, threads)
To be fair, arbitrary fillets/blends on edges is a hard problem in general for Parasolid/ACIS because you are trying to mutate arbitrary topology, essentially guessing vertices/edges/faces and trying to stitch the back together.
This is true, but in things like OnShape I can do it with two clicks whereas in OpenSCAD it's always at least 20 minutes of thinking and trying out.
OpenSCAD is super cool and my go-to for simple things, but for anything more involved than a cube or cylinder with some cutouts I tend to revert to "normal" CAD programs.
Concur. It's worth explaining this, as someone new to CAD would get the impression the various tools in CAD are on even ground, and may assume "I know programming, so OpenSCAD sounds like the right choice". I would love some day for programmatic and/or free/cheap CAD to be competitive, but we're not there. Solidworks, Fusion, Inventor etc still outclass FreeCAD, which outclasses OpenSCAD.
I agree with your ordering of the various programs out there but FreeCAD 26.3 is now available as a release candidate with a wonderful collection of improvements. I'd think for many people, FreeCAD is now "good enough" for a lot of things. I'm building a virtual pinball cabinet and the whole thing is modeled in FreeCAD.
Mango Jelly's overview of some of the biggest new features: https://www.youtube.com/watch?v=WdTyFHY-5r4
2 replies →
Oh, since this came up, for people who like code CAD and want to try something more powerful than OpenSCAD:
https://github.com/yuechen-li-dev/Aetheris/
Not an OpenCascade wrapper, it's based off my own experimental BREP geometry kernel. So, fillets/chamfers work, booleans works fairly robustly, surfacing, sheet metal, etc all works decently, it exports STEP AP242 by default.
Haven't had time to get the AIs to write a more up to date documentation and polish the language server. Not the easiest thing to use right now, so, using it through Codex/Claude Code or CLI is probably the easiest way to get started.
Still working on the webUI currently, in case someone want to DIY the UI. Note that the WASM compilation path is still unoptimized and way slower than the RyuJIT C# compilation though.
https://github.com/yuechen-li-dev/helioscad
Not even two years ago writing your own BREP kernel was considered to be out of reach for even the most determined dedicated hardcore engineering teams that weren't extremely well funded. Now, it seems tractable and may finally get us out of the dependence on proprietary kernels that has plagued this industry for decades.
Yeah, I know. I started this project earlier this year because of my own frustration with the software ecosystem and that the major CAD vendors is charging thousands of dollar to add STEP 242 support and because of proprietary lock-in and locking everything behind cloud, and was trying to see if I can accomplish this with AI.
I'm not going to pretend this is easy: I actually quit multiple times for this project because I ran into the same walls that everyone else ran to: arbitrary 3D boolean operations is HARD,(Surprisingly, I actually didn't have that much trouble with fillets/chamfers because I kept them pretty bounded) and the approach I've finally taken to solve it is pretty insane. Essentially, the final architecture is more like "LLVM for 3D objects" compiler stack than it is traditional BREP kernel. Would love to talk about the technical deep dives if people want to hear it.
Also, feel free to write UI wrappers around it, because I'm pretty bad at UI design myself.
2 replies →
The one you want is the experimental build, it is way faster to the point that 'preview mode' should be disabled. I use OpenSCAD a lot, it ties right into my workflow and plays nice with versioning and re-using modules from one project to another. Over time I've built up a nice library of parts that I can quickly customize for whatever it is that I'm building. Latest project: pick-and-place machine modification for Prusa MK3 3D printers (an interesting challenge, to put it mildly), now working on some robotics stuff.
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.
> things like variables and such do not quite work in the way you would expect from a programmers point of view.
I'm a novice at OpenSCAD still despite doing a bunch of small projects with it recently. Can you give an example of this happening? Most of the confusing stuff so far has been geometry breaking my brain and not some kind of scope issue.
> 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.
To put it another way, it's a purely functional language in a very strict way that takes some getting used to.
Look into OpenPNP. Most of the PnP work is already done (vision, motion, feeders, etc). Just a matter of making the Prusa frame react to the commands.
That's what I'm running.
2 replies →
For these eternal Fillet-Whiners: Antigravity made simple Blender-tool that rounds all edges in STL-file. Sharp edges never look good in print and avoiding them feels often like too much extra work.
https://github.com/timonoko/OpenSCAD-rounding-in-Blender
I have been using OpenSCAD to create cool geometric designs for 3D printing on fabric, with great results. The functional model is likely unfamiliar to most developers, but I have found that I can be efficient and productive with it.
Check out my repos of OpenSCAD objects at https://github.com/jeffbarr/OpenSCADObjects and Truchet Tilings at https://github.com/jeffbarr/TruchetTilings .
My code kind of looks like the C that I wrote in the 1980s, with lots of braces and careful indenting -- not sure if that is a bug or a feature.
As another commenter noted, use the latest nightly build for best results.
I tried OpenSCAD but it ends up being too abstract and hard to maintain for me and like others it does not solve fillets/procedural selection well.
So here is my shameless plug "sograph": https://imgur.com/a/u1n2Grg
I should consider a Show HN instead, but it is too early to release yet.
Shamelss plug:
I have built FluidCAD[1] to overcome the issues of CAD by code, less mental effort to design by providing visual guidance. Slowly it became more of a hybrid CAD experience (mouse or code driven), almost all features now can be done by mouse and the code is generated for you. It'll pick the right selection filters for you.
https://github.com/Fluid-CAD/FluidCAD
https://fluidcad.io/
One of my favourite tools.
As noted, use the Nightly builds from: https://openscad.org/downloads.html#snapshots
When working with kids, it's well worth keeping: https://www.blockscad3d.com/editor/ in mind, or for folks who like to draw connections: https://github.com/derkork/openscad-graph-editor
Eventually, someone will note that its programming model limits variables and so forth --- for folks who want a more traditional language choice there are a number of options, notably for Python:
https://pythonscad.org/
I've been using Opus 5.5 to write openscad models for me for the past week, with great success. I wanted to expand the project Open Source Watch Winder [0] to have 8 watches, with gears instead of pulleys, and in little back and forth I have a version I've started printing. [1]
[0] https://github.com/mwood77/osww [1] https://imgur.com/a/bWent0K
It would be interesting to see a head to head comparison of frontier LLMs building models with OpenSCAD, Blender scripting, and Fusion MCP. My intuition would be that blender winds up the best for the immediate result due to training data prevalence and RL tuning, but the concise nature of OpenSCAD could help.
I'll have to add this to my backlog of experiments to try when I have unused tokens near a reset...
Blender gives you a mesh that isn't parameterized. Not particularly useful for making dimensional changes outside of eyeballing everything. An LLM isn't going to reliably hit your dimension targets so tweaks will be necessary.
Yeah, that's what I meant by "immediate result", if you need to edit the generated model by hand it will be hard to beat having the model and timeline available in Fusion after using Fusion MCP.
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.
I created an (unpublished) MCP for a CAD that didn’t have one before and LLMs are just fine at it. It looks like they can apply their higher level training across interfaces.
I use openscad for all my kicad 3d models via scad->off->obj->(manually edit in mm3d to add colors)->wrl->kicad
It's not as bad as it looks, it's all automatic except adding colors which takes about 2 minutes.
Yes, also have a look at build123d which has a vscode plugin.
I second this -- I much prefer build123d to OpenSCAD.
Note that the current release version is very old, I strongly recommend downloading the nightly version and turning on the manifold geometry solver in settings as it's much faster.
How does OpenSCAD type stuff play with simulation, in general. (If at all?)
I’m thinking of something like finite element analysis… but, I guess since the shapes in OpenSCAD are defined through this constructive geometry system, can things be better/more mathematically defined general purpose “discretize the PDEs over my mesh” type solutions?
Normal finite elemts does not care. The mesh ist just put on your 3d body that can be an stl or a step or whatever. The FEM only knows the nodes and nothing else. The mesh geometry is completely separate from the CAD file.
Now there is a method called Isogeometric Analysis (IGA) that was meant to improve this. It uses NURBS functions (just like CAD) for the shape functions of traditional FEM. The idea was that now, if you have NURBS describing the CAD geometry you can skip meshing and just directly calculate on the real geometry. But it did not catch on. The reason being basically, as far as I remember, was that most CAD geometries of interest are not pure NURBS. But they are operations of NURBS (think cube minus some other cube - trimmed surfaces). And IGA has problems with that.
This is a problem that openSCAD will probably also not be able to overcome. Maybe at times it might be easier to create NURBS geometries without trimmed surfaces. But most probably that cannot be done in most cases of real world significance.
Ah, that makes sense. I think Isogeometric Analysis was the idea I was circling (the though process being “of course you can always export to a mesh, but the OpenSCAD model seems to encode more designer intent so why not use that for simulations directly”). I’ll have to read up on what was tried and why it didn’t catch on. Thanks!
I love OpenSCAD. Have been a power user for years. It's so great asking LLMs to make 3d models in openscad.
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
Does it have rust versions of the full stack of libraries like Agnis Johnson's Clipper, etc? How compatible is the kernel with CGAL Rational?
Seconded. OpenSCAD is a bit tedious to use from scratch but claude is pretty decent at generating the code. It can't render the script though so it tends to make silly mistakes
Wrote a tutorial:
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.
BOSL2 library combined with LLMs really make me fly with my creations.
If you want openscad without the abomination that is the openscad language - check out jscad
OpenSCAD is amazing for those who know nothing about 3D but know about programming.
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.
As a programmer, I second this. Systems like Blender are inscrutable to me, but in OpenSCAD I just write some loops. I get what I want and it's easy to tweak.
The nightly builds for this are so much better. When are they going to merge the nightlies into a new mainline release? The last one showing 2021 isn't the best look...
This problem has made me search for other solutions. I need tools that ship.
I barely know openscad (used Fusion 360 before autodesk enshitified it) but gemini is very good at creating code I can paste into openscad.
[dead]