Does this have a web-based playground? I find <a href="https://www.pythonscad.org/playground/" rel="nofollow">https://www.pythonscad.org/playground/</a> to be nice to try out the project.
Agreed! I’m already working on it, but it’s not quite ready yet. ETA is 1-2 weeks.
I was actually able to get a first version released just now: <a href="https://luacad.ad-si.com/playground" rel="nofollow">https://luacad.ad-si.com/playground</a>
It's still rather bare bones and won't work well for large models, but otherwise it should be fully functional!
Really interesting! I actually use freecad so I'm use to that layer of the process but I'll check this out. Also good to see the work being done in modeling software these days
A scripting engine is a great feature in cad, you should be proud of your achievement. The reason I'm not personally interested is that i used lisp in AutoCAD in the 00s. What i like most about lua is that it's not php. It's a sane choice, but insipid.<p><a href="https://www.cadtutor.net/tutorials/autolisp/quick-start.php" rel="nofollow">https://www.cadtutor.net/tutorials/autolisp/quick-start.php</a>
Honest question here -- for doing 3D parametric design, is the "programmatic" approach a good thing? If you compare doing a design in LuaCAD to something like Solidworks or ProE, can you get to the end result faster, and easier?
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.<p>Just give it a try, I guess, and see if it works for your use cases!
Love it! OpenSCAD has very painful syntax. Is it possible to easily do bevels/chamfers or does it have the same limitations as OpenSCAD there?
Is it able to access the file system and write/read files?<p>I've been doing that via PythonSCAD for my current project <a href="https://github.com/WillAdams/gcodepreview" rel="nofollow">https://github.com/WillAdams/gcodepreview</a> and it might be interesting to do a re-write in another language.
Isn't OpenSCAD's limited (non-Turing complete) language a feature?
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: <a href="https://github.com/ad-si/LuaCAD#why-lua" rel="nofollow">https://github.com/ad-si/LuaCAD#why-lua</a>) I guess 3D modeling is just too complex for a simple, but limited DSL.<p>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.<p>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.<p>Sometimes making things "more programmable" is an anti-feature.
Yes, it is.<p>The most notable aspect of this (and one which I've complained in the past) is the inability to write out file, which has security implications.
The change history on this repository is fascinating
Lua is the only language that's born to be embedded — tiny, fast to start, trivial to bind.
[flagged]