by erjiang · 1mo ago · 0 comments
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.)
Don't get me wrong, I love it myself and use it as much as possible simply because it's outstanding to be able to express a complete design in 1k of plain text which is readable, diffable, gittable.
You can get a lot done, and some things you can do even easier and simpler than anything else, and you can work-around some things, and you can get a good-enough almost-what-you-want other times, and it's practically ideal for certain classes of jobs as long as you're willing to live within the limits.
But "live within the limits" is not something a general purpose tool gets to say.
You can get some fillets easy sometimes if the geometry just happens to lend itself to some boolean op like making a rounded corner hollow box by hulling 8 spheres (which you can populate effortlessly with translate,copy,mirror) and then cutting another smaller copy. Voila, all kinds of interior and exterior fillets in like 10-15 short lines of plain text code. And the whole thing fully parameterized with dead simple variables sitting off by themselves with human descriptive names at the top of the file.
But that does not mean anything. That's a choice showcase example, and all the other infinite real life cases are somewhere between agonizing to code, to agonizing to code and agonizing for the computer (minkowski), to flat impossible.
I love openscad but this implication that it's just a matter of using it right is false.
Writing now about it, I think I could do it with a torus, where the radius of its cross section is the small radius, the torus radius is the large one, take two of them, add two cylinders to only keep one quarter edge and then take a quarter of the resulting bevelled disk.
If I have to build points up by hand, why not skip OpenSCAD and directly write python scripts that create your OBJ files? The point of OpenSCAD et.al. is to programmatically create geometry. Making exactly that easier is a feature in my eyes. And that means you provide/support multiple modeling paradigms that can expressively combined.
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.
If you want to make a complex gear that has to mate with another gear you can do this in two ways: you can start with two discs intersecting at the right angle and then to chop out the teeth so the resulting object will be a gear and then you could subtract via a similar operation from the other disc to end up with two mating gears.
The - in my view much more effecient - alternative is to start off with just the supports as the discs and then to parametrically add the gear teeth onto the supports taking into account all of the clearances and the contact faces. This will get you much better gears because you are parametrically describing the surfaces that really matter and it will allow you to do nice things such as small fillets on everything to make the object far closer to what eventually will roll out of your manufacturing process (machining, 3D printing). It is a bit more work to define all of the parameters but the end result is much better and far less likely to have imperfections because you are generating what you want, not removing what you don't want. OpenSCAD can be used for sculpting, but that's not the best way of using it.
- Geometry: https://www.goodreads.com/book/show/58059196-make
- Trigonometry: https://www.goodreads.com/book/show/123127774-make
- Calculus: https://www.goodreads.com/book/show/61739368-make
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 honest, my anger was much heavier on solidworks for being so expensive (i had a student licensw tho) and buggy.
And then the worse is better trap gets them and they don't even bother looking for true programmatic CAD like build123d.
I think that's an unfair assessment. It has rough spots (as I'm sure all CAD software does) but it's functional and UX is improving rapidly with every release. It feels like it's built up a lot of momentum since I picked it up a few years ago.
It can do everything I need it to do. I mostly use the Part Design workbench, Part, Sketcher, Assembly, Lattice2, Fasteners, Spreadsheet; occasionally Curves and Curved Shapes workbenches. If I run into an issue the solution is almost always easy to find on their wiki, on Youtube, or by asking in their Discord server - the community is friendly and helpful in my experience.
Never tried OpenSCAD, maybe I’m old fashioned but graphic workflow works better for me.
One use case I was interested in: coming up with a (simple) box with cavity in it, and having this CNC'd. (For a simple custom keyboard shell).
Although OpenScad can express the geometry of the geometry without difficulty, it was burdensome to export the .step file that the CNC manufacturer wanted. To my understanding, CSG's model is just fundamentally different than what .step wanted. And re-using the geometry for a technical drawing to communicate e.g. threading wasn't something OpenScad could handle smoothly.
I haven't quite ported this to build123d. But, from a cursory look asking an LLM to do port my code, I was given the impression that it could manage the task. (Certainly build123d was better suited to technical drawings).
I absolutely despise STL as a format and think it doesn't have any place it should be used.I have a hard time taking OpenSCAD seriously due to this.
As a long-time OpenSCAD user, I don't disagree with you but would also point out that LLMs can now make it very easy to do a lot of this sort of thing while still using OpenSCAD.
I actually find Gemini/agy to be the best of the ones I've tried when it comes to working with OpenSCAD code. And I don't recommend trying to use LLMs to one-shot geometry of anything complicated, but they are great for things like "take this OpenSCAD code and generate a fillet along these edges, abstract the fillet into its own module and make it parametric so I can easily modify the radius".
Granted, selecting a few faces or edges in a GUI CAD program and clicking a button is even easier than that, but only once you've spent a lot of time learning how to use the CAD GUI (which, IMO, are nearly universally very unintuitive until you've spent a lot of time working with them).
- treat the CSG as merely a 3D preview, output a DXF, use a traditional CAM tool to create toolpaths from that file --- I did work up support for arcs, and am looking into more general curve support
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.
Mango Jelly's overview of some of the biggest new features: https://www.youtube.com/watch?v=WdTyFHY-5r4
I tried to follow along w/ a book which was purportedly for 1.1, but it turned out to actually cover 1.0
The wiki tells you what the tools do. For learning how to use those tools to model something, YouTube channels like Mango Jelly's are a better bet. The pace of FreeCAD development has definitely picked up since the 1.0 release
I actually still use the freecad gui because it’s cheaper but I can totally see how someone new might just wanna use the MCP.
Also, in many cases, extruding an SVG works wonders. Just design the flat projection in something like Inkscape, interactively, and then import and extrude. You can do this for many shapes, then combine or subtract, etc.
But the other thing is, I have found that in many cases I don't need fillets at all; when printing small parts on a consumer-grade 3D printer, the relatively low precision of the printer is enough to round the edges.