IMAGE := streamplace-cube-openscad RUN := podman run --rm -v $(CURDIR):/work $(IMAGE) .PHONY: image stl preview clean help help: @echo "Targets:" @echo " make image — build the OpenSCAD podman image" @echo " make stl — render out/cube_{bottom,top,front}.stl" @echo " make preview — render out/preview.png (host openscad; exploded view)" @echo " make clean — remove out/" image: podman build -t $(IMAGE) . out: mkdir -p out stl: out $(RUN) -D 'part="bottom"' -o /work/out/cube_bottom.stl /work/cube.scad $(RUN) -D 'part="top"' -o /work/out/cube_top.stl /work/cube.scad $(RUN) -D 'part="front"' -o /work/out/cube_front.stl /work/cube.scad # Preview uses the host's openscad — the containerized version's headless PNG # path hangs on this hardware. `--viewall --autocenter` makes openscad auto-fit # the bounding box; the rotation triple chooses a nice 3/4 angle. preview: out openscad -D 'part="preview"' \ --imgsize 1400,1100 \ --autocenter --viewall \ --camera 0,0,0,55,0,25,0 \ --colorscheme Tomorrow \ -o out/preview.png cube.scad clean: rm -rf out