You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenSCAD files open directly: .scad works wherever .lua does, on the
command line and in Studio. LuaCAD evaluates the language itself, so no
OpenSCAD installation is involved.
The front end is a vendored copy of OpenRSCAD, as the new luacad-scad-syntax, luacad-scad-ir and luacad-scad-eval crates.
include/use resolve relative to the file, then against OPENSCADPATH.
linear_extrude with a non-uniform scale, resize(auto = …) and an import() in an unreadable format warn instead of quietly differing.
The playground stays Lua-only.
luacad render --raytrace path-traces the model: soft shadows, ambient
occlusion, smooth shading with sharp creases.
--samples N sets the samples per pixel (default 128).
--camera AZ,EL sets the view.
Renders are 2048×1536 and fit to the model by default.
Surface materials via shape:material(...).
Kinds: matte, plastic, metal, glass, emissive, each with its
own parameters, e.g. material("glass", { ior = 1.5 }).
Presets with a default color: steel, chrome, gold, copper, brass, rubber, wood, ivory.
wood draws procedural growth rings, tuned with ring_width, grain_axis, grain_offset, grain_contrast and grain_distortion.
--raytrace maps the kinds onto real BSDFs; the rasterizer and Studio
approximate them. See examples/materials/.
surface() builds real geometry on the Manifold backend, so a heightmap
previews, renders and exports without --via-openscad.
New invert parameter and table form: surface{ "relief.png", center = true, invert = true }.
Every example lives in its own directory with a rasterized and a
path-traced image next to it, regenerated by make example-images.
examples/chess/ is the first example written in OpenSCAD: a game laid
out from a FEN string, with pieces from scad-chess (CC-BY-4.0).
Studio:
Raytrace button: path-traces the current view.
Screenshot button: captures a region into a PDF with pen, arrow,
rectangle and ellipse markup, a note, and the studio's settings listed
under the image.
Transparent button: draws every object see-through, from the
materialized booleans, so cavities and enclosed parts stay visible.
The opened file is reloaded when another program changes it
(#14).
The code editor can be hidden, with Cmd/Ctrl + E
(#12).
The projection is remembered across restarts
(#18).
--help and --version exit instead of starting the GUI; Settings →
About shows the same (#15).
Scripts run on a background thread, so the window stays responsive.
Both binaries append git describe to their version when built from a
checkout. LUACAD_GIT_DESCRIBE overrides the suffix.
Changed
Studio's preview moved from OpenCSG on legacy OpenGL to WebCSG on wgpu.
Runs on Metal, Vulkan or DirectX 12; building no longer needs OpenGL
headers, and opencsg-sys is retired.
Lives in the new luacad-preview crate, shared with the playground.
Deeply concave shapes with a declared convexity, and unions inside an
intersection, stay interactive instead of being materialized.
Large models redraw about twice as fast.
The playground draws the same preview, on WebGPU, from a second
WebAssembly module.
A script no longer waits for its booleans to be computed.
A browser without WebGPU says so and keeps everything else working.
The example images and the website's previews are WebP instead of PNG,
a tenth of the size. make example-images needs cwebp.
--via-openscad runs the binary named by OPENSCAD when it is set. The
BOSL2 differential tests take the same variable and skip themselves
against OpenSCAD 2021.01.
The minimum supported Rust version of luacad and luacad-studio is
1.96. luacad-manifold-sys and the luacad-scad-* crates still build
on 1.89.
import() of an SVG reads unitless coordinates at 72 dpi rather than 96,
as OpenSCAD does.
polygon() in the SCAD tree carries optional contour index lists, so an
imported polygon(points, paths) and the counters of an OpenSCAD text() come through as holes.
legacy_lua/ is no longer part of the repository. It can be read at the v1.1.0 tag and lives on at thechillcode/Lua_CAD.
Fixed
Studio preview:
A polyhedron() was drawn inside-out, so a concave one lost its
cavity in a boolean. The solids behind the BOSL previews had the
opposite problem. Every polyhedron now uses OpenSCAD's winding.
A boolean operand far larger than the shape it carves made the
carved-away stock reappear at some camera angles.
A part under an odd number of mirror() calls was invisible.
Studio editor:
Crashed on multi-byte characters in the status line.
Case-insensitive find highlighted the wrong place for characters whose
lowercase changes length.
Lua API:
square { {10, 20}, center = true } built a 1×1 square and cube { size = 10 } a 1 mm cube.
obj:multmatrix(m) collapsed the model to a point for a nested 4×4
matrix.
luacad lint reported settings as undefined; a misspelled special
variable is now reported instead.
Geometry:
A part that cannot be built — cube(0), sphere(r = 0), a linear_extrude() of height zero — emptied everything it was combined
with. It now contributes nothing, and a .scadlinear_extrude()
warns.
render --raytrace drew the triangulation of large flat faces as thin
dark lines.
OpenSCAD front end:
surface(invert = true) flipped the brightness instead of negating
the height.
import() of an SVG imported nothing; it now returns a sketch with
even-odd holes and honours center = true.
A C-style list comprehension with an empty init or update clause was
a parse error, which took BOSL2 down with it.
text() naming a bitmap-only font emitted nothing instead of moving
on to the next candidate.
convert --via-openscad dropped surface() and import() assets given
as relative paths.
Building on macOS inside nix develop failed in Clipper2; luacad-manifold-sys now honours SDKROOT.