I've tried to get into Solidworks, Fusion, and FreeCAD several times, but every time I come back to programmatic CAD. It just better matches how I think about 3D design I guess. Also, I love that there can't be any hidden state or constraints -everything is fully defined by your code and fully visible.
Just give it a try, I guess, and see if it works for your use cases!
I was actually able to get a first version released just now: https://luacad.ad-si.com/playground
It's still rather bare bones and won't work well for large models, but otherwise it should be fully functional!
I'm pretty sure it's Turing complete by now. If it was conceptualized as a limited language and only became a full fledged programming language over time, it would certainly explain all its weird warts. (Here is some more details: https://github.com/ad-si/LuaCAD#why-lua) I guess 3D modeling is just too complex for a simple, but limited DSL.
Lua is easier to use, faster, and more feature-rich. It's one of those rare occasions when a new solution is actually better in every single way.
In the pedantic sense, yes. You can use recursive functions with tail-call optimization, or list comprehensions to emulate a universal Turing machine.
But my point is that OpenSCAD's expression purity and one-way compilation model are purposefully limited, and not historical accident: models are a deterministic function of their parameters, subtrees can be cached and reused during preview without invalidation logic, designs diff and merge as text, etc.
Sometimes making things "more programmable" is an anti-feature.
AFAIK OpenSCAD does not do any meaningful optimizations that are enabled by having a limited DSL, despite that normally being a good reason to do a DSL. And ironically you often have use a general purpose language (python and C++) to do custom optimizations not possible in the DSL.
Can you fillet unions? Like, if I union a cube with a smaller cube sticking out of its side, can I make a fillet so that the edge where the two cubes' faces intersect doesn't become a stress concentration point for cracks to start at? This is OpenSCAD's primary weakness from my point of view.
I've had good success w/ using Lua in LuaLaTeX, so hopefully a good fit for me to exercise my programming chops. I think it will be interesting to maintain two parallel versions for comparison/contrast. Thanks!
Interesting - I would never use it as I find entering math with plain ASCII much faster and more intuitive, but if there is interest in this, I'll increase its priority!
ASCII entry is great if you already know exactly what you're doing. There's no built-in tooling to help you convert your intent to ASCII. You have to be confident that your entry accurately represents what you intended, since the input isn't typeset in the output either. And you have to be comfortable doing the translation in your head as you go back and forth across your work, fast enough that it doesn't get in the way of reading your own notebook.
A lot of what makes Mathematica notebooks valuable is that they're readable. I can't read a Woxi Studio notebook, I can only re-parse it. It seems that mathematical expressions included in text don't render in Woxi Studio either so it isn't possible to read notebooks that include math content. The ASCII position is completely reasonable for Woxi as a language; it just falls short of what Mathematica notebooks do for me.
I'm really impressed with everything else. Functions, plotting, solves — the tool works, is really fast and I'm super impressed. I might reach for your browser playground going forward. This is the type of software that makes me glad open source exists.
Just give it a try, I guess, and see if it works for your use cases!