Add hex holder designer page (/holder)
Server-side OpenSCAD renders STL from bundled hex_cell.scad with parameter
overrides via -D. Frontend is a Three.js viewer with auto-form generated
from /api/holder/params. 'Design busbars →' button posts the computed
cell coordinates to /api/projects and redirects to the busbar editor with
the holder cells pre-loaded.
- holder.py: openscad subprocess wrapper + compute_cells()
(Python mirror of get_hex_center_points_*)
- scad/hex_cell.scad: verbatim copy of Addy/Hex-Cell-Holder source
- app.py: /holder route + /api/holder/{params,render,cells}
- static/holder.html etc: parameter form + Three.js STL viewer
- Dockerfile / install.sh: apt install openscad
- static/index.html: nav link Holder ↔ Busbars in topbar
This commit is contained in:
+3
-1
@@ -20,9 +20,11 @@ RUN pip install --user -r requirements.txt && \
|
||||
|
||||
FROM python:3.12-slim AS runtime
|
||||
|
||||
# OCP needs these at runtime.
|
||||
# OCP runtime libs + openscad (subprocess for /api/holder/render).
|
||||
# openscad headless renders STL from .scad with parameter overrides via -D.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libgl1 libglu1-mesa libxrender1 libxext6 libsm6 libgomp1 \
|
||||
openscad xvfb \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& useradd --create-home --shell /usr/sbin/nologin app
|
||||
|
||||
|
||||
Reference in New Issue
Block a user