OpenSCAD 2021.01 (Debian 13 default) is single-threaded CGAL. The Manifold
backend, available in OpenSCAD 2024+, parallelises CSG operations and
gives massive speedups on multi-cell holders.
Bench on this LXC (6 cores), realistic params:
6x12 (72 cells): CGAL 3.14s -> Manifold 0.08s (37x)
10x20 (200 cells): - 1.41s
15x25 (375 cells): - 1.97s
Installation steps performed on the server (manual, not in this repo):
wget https://files.openscad.org/snapshots/OpenSCAD-2026.04.26-x86_64.AppImage
./AppImage --appimage-extract (no FUSE required)
ln -s squashfs-root/AppRun /usr/local/bin/openscad-nightly
Code changes:
- holder.py: new OPENSCAD_BACKEND env var (default "Manifold");
appends "--backend Manifold" to the openscad call when set.
- deploy/busbar-designer.service: points OPENSCAD_BIN at the
extracted nightly and sets OPENSCAD_BACKEND=Manifold.
Real-time progress percentage was investigated but not implemented:
OpenSCAD has no headless --progress flag, so live % from the CLI is
not feasible. With Manifold making renders sub-second to a few seconds,
the existing indeterminate progress bar + elapsed timer is sufficient.
- Replace debounced auto-render-on-param-change with an explicit Render
button. Param changes mark the button "dirty" (accent ring); user clicks
Render to drive a render. A Cancel button (AbortController) appears
while a render is in flight.
- Add indeterminate progress bar with elapsed-time counter in the status
panel. Real OpenSCAD --progress streaming can come later.
- Bump OPENSCAD_TIMEOUT default 60s -> 300s and gunicorn --timeout
120s -> 300s. The 60s cap was misclassified by the frontend as
"OpenSCAD not installed" because the error string contained the word
"openscad" -- which the JS matched too greedily.
- Frontend error classifier now distinguishes "binary not found",
"timed out", and "geometry empty" cases and only shows the
install-OpenSCAD hint for the real not-found case.
ezdxf, matplotlib, and other Python libs try to write into $HOME/.config
and $HOME/.cache. With ProtectHome=true the real /home/busbar is invisible
to the service and pathlib.Path.exists() throws PermissionError.
Fix: set HOME, XDG_CONFIG_HOME, XDG_CACHE_HOME to /opt/busbar-designer/data/*
which is already in ReadWritePaths. Hardening (ProtectHome) stays intact.
install.sh also pre-creates the .config / .cache subdirs.
Web tool for designing nickel/copper busbars over cylindrical-cell battery
packs (21700, 18650) in hex holders. Flask + build123d backend exports
STEP/DXF/SVG; vanilla JS frontend with live preview, multi-project SQLite
persistence, snapshot history.
Deploy scripts in deploy/ (proxmox-lxc.sh, install.sh, update.sh).