Lua Cad

lua-users home
wiki

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

Example

-- 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")

RecentChanges · preferences
编辑 · 历史
最后编辑于 2015 年 7 月 30 日下午 2:08 GMT (差异)