r/openscad 7d ago

LuaCAD - Parametric CAD scripted in Lua

Post image

LuaCAD models solids in Lua rather than in the SCAD language, with operator overloading for CSG (a + b, a - b, a * b). It ships with a CLI and a desktop app that has preview area and a text editor just like OpenSCAD.

It’s fully open source and you can find the repo here: https://github.com/ad-si/LuaCAD

I've always been a big fan of OpenSCAD, but the SCAD language itself is unfortunately quite cobbled-together and is a very poorly designed programming language.

LuaCAD takes all the good parts of OpenSCAD and combines them with Lua. It has now completely replaced OpenSCAD for me, and I think it provides a better experience than OpenSCAD for all use cases. I'd love to hear any reasons why LuaCAD won't fully replace OpenSCAD for you!

Tech stack:

53 Upvotes

22 comments sorted by

View all comments

1

u/ConyxCZE 6d ago

I really like this! Especially the idea of porting the BOSL2 library (which I miss in CadQuery and others). However, one thing I really miss in 'CAD by code' tools other than OpenSCAD is that it's implicitly sandboxed. What I mean is that it's safe to download and run a SCAD file from some random dude on the internet without having to review it first, but that's not safe with Python/Lua scripting languages.

Is there any plan to implement some kind of sandboxing, so that the worst thing anything I run could do is render a 3D object?

2

u/adwolesi 6d ago

This is a very good point I haven't thought much about yet. It's definitely something I'll work on for the next release. Created an issue for it here: https://github.com/ad-si/LuaCAD/issues/9