📦 What
Move the export-png.sh script functionality into scadm as a scadm export-png command so both homeracker and homeracker-exclusive can use it without duplicating the script.
💡 Why
cmd/export/export-png.sh is currently duplicated across repos (homeracker core and homeracker-exclusive, with the exclusive version adding -D and --output support). This violates DRY — scadm already manages OpenSCAD installation and knows where the binary lives. 🔧
🔧 Proposed Features
scadm export-png <input.scad> — basic PNG export
--output <path> — custom output path
-D key=value — OpenSCAD variable overrides (repeatable)
--view <mode> — preset camera angles: iso (default), front, top, back, left, right, bottom, all (renders all views as separate PNGs)
--imgsize W,H — image dimensions (default: 1920,1080 🖥️)
--colorscheme <name> — OpenSCAD color scheme (default: BeforeDawn 🌑)
--camera <params> — raw camera override: translate_x,y,z,rot_x,y,z,dist — overrides --view when both are specified ⚠️
📐 View Presets
| View |
Camera (translate_x,y,z,rot_x,y,z,dist) |
iso |
0,0,0,55,0,35,0 (default) |
front |
0,0,0,0,0,0,0 |
top |
0,0,0,90,0,0,0 |
back |
0,0,0,0,0,180,0 |
left |
0,0,0,0,0,90,0 |
right |
0,0,0,0,0,270,0 |
bottom |
0,0,0,270,0,0,0 |
all |
renders all of the above as <name>_<view>.png |
💡 --autocenter --viewall is always applied, so dist=0 lets OpenSCAD auto-fit.
✅ Once Available
Both repos can remove their export-png.sh scripts and use scadm export-png directly. The render-mw-modules.sh wrapper (exclusive repo) can also switch to calling scadm export-png. 🚀
📦 What
Move the
export-png.shscript functionality into scadm as ascadm export-pngcommand so both homeracker and homeracker-exclusive can use it without duplicating the script.💡 Why
cmd/export/export-png.shis currently duplicated across repos (homeracker core and homeracker-exclusive, with the exclusive version adding-Dand--outputsupport). This violates DRY — scadm already manages OpenSCAD installation and knows where the binary lives. 🔧🔧 Proposed Features
scadm export-png <input.scad>— basic PNG export--output <path>— custom output path-D key=value— OpenSCAD variable overrides (repeatable)--view <mode>— preset camera angles:iso(default),front,top,back,left,right,bottom,all(renders all views as separate PNGs)--imgsize W,H— image dimensions (default:1920,1080🖥️)--colorscheme <name>— OpenSCAD color scheme (default:BeforeDawn🌑)--camera <params>— raw camera override:translate_x,y,z,rot_x,y,z,dist— overrides--viewwhen both are specified📐 View Presets
iso0,0,0,55,0,35,0(default)front0,0,0,0,0,0,0top0,0,0,90,0,0,0back0,0,0,0,0,180,0left0,0,0,0,0,90,0right0,0,0,0,0,270,0bottom0,0,0,270,0,0,0all<name>_<view>.png✅ Once Available
Both repos can remove their
export-png.shscripts and usescadm export-pngdirectly. Therender-mw-modules.shwrapper (exclusive repo) can also switch to callingscadm export-png. 🚀