Luametry is a professional, Lua-based parametric CAD tool designed for engineers and makers. It provides a clean, programmatic API for creating complex 3D geometry using Constructive Solid Geometry (CSG), powered by the lightning-fast Manifold geometry library.
- Professional Export Suite: Support for STL, STEP (industrial CAD), OBJ, and 3MF (additive manufacturing).
- Text Extrusion: Generate 3D text with configurable fonts, weight, and rounding.
- Parametric Operations: Native support for Fillets (rounding) and Chamfers (beveling).
- Modern CLI: Live preview mode, high-quality PNG screenshots, and easy system installation.
- Luam Dialect: Uses a modernized Lua with
!=support, multi-line strings, and local-by-default scoping. - 100% Verified: Every feature is rigorously tested with an automated test suite.
Requires g++, luam (static lua builder), and the manifold C++ library.
# Build the binary
./bld/build.sh
# Install globally to /usr/local/bin
sudo luametry installLuametry comes with a powerful command-line interface:
luametry run <script>: Executes a script and generates an STL.luametry live <script>: Starts live preview mode. Watches for file changes and reloads the 3D viewer (default:f3d) instantly.luametry screenshot <script>: Generates a high-quality shaded PNG of your model.luametry export <script> -o <file>: Exports to a specific format (detects.step,.obj,.3mf,.stl).luametry update: Pulls the latest project updates and rebuilds.
cad.cube({size, center})cad.sphere({r, fn})cad.cylinder({h, r1, r2, fn, center})cad.torus(major_r, minor_r, major_fn, minor_fn)
- Fillet:
cad.fillet(shape, radius)(alias:cad.round) - Chamfer:
cad.chamfer(shape, size)(alias:cad.bevel) - Extrude:
cad.extrude(polygon, height, params) - Revolve:
cad.revolve(polygon, segments, degrees)
-- Create 3D labels easily
label = cad.text("LUAMETRY", {
h = 10, -- Height
t = 1.5, -- Stroke thickness
z = 2.0, -- Extrusion depth
rounded = true -- Smooth joints
})cad.union({shapes})cad.difference(base, subtract)cad.intersection(a, b)cad.hull({shapes})
You can customize Luametry via ~/.config/luametry/settings.lua:
return {
viewer = "f3d", -- Your preferred 3D viewer
viewer_args = "--up +Z --shading-model pbr",
default_output = "out/result.stl"
}Run the full test suite to ensure stability:
./bld/build.sh --testMIT License. See LICENSE.
Core Dependencies:
- Manifold (Apache 2.0)
- Lua (MIT)
- LuaFileSystem (MIT)