Lua Cad |
|
Lua CAD 是許多 lua 腳本的集合,允許您使用 Lua 腳本語言語法建立合法的 OpenSCAD CAD 檔案 (http://www.openscad.org/)。OpenSCAD 腳本會傳遞給 OpenSCAD 可執行檔,然後將其編譯成 STL 檔案。例如,Lua 接著會用來將 STL 轉換成 OBJ。
限制
- 僅限 Windows(除非您自己修改幾項設定,儘管我沒有 Linux,所以我無法測試)
您可以於 GitHub 上找到程式碼,https://github.com/thechillcode/Lua_CAD
範例
-- create a cube, pos 0,0,0, width =10, height =20 and depth=30 local cube = cad.cube(0,0,0, 10,20,30) -- export as stl cube:export("D:\\cube.stl") -- export as obj in red cube:export("D:\\cube.obj", {255,0,0}) -- subtract another cube form this one local cube_sub = cube - cad.cube(5,5,0, 10,10,10) cube_sub:export("D:\\cube_sub.stl")