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:
@@ -1,4 +1,15 @@
|
||||
# Busbar Designer
|
||||
# Busbar Designer + Hex Holder Designer
|
||||
|
||||
Web "combine" for cylindrical-cell battery pack production. Two pages:
|
||||
|
||||
| Page | Purpose |
|
||||
|-------------|---------------------------------------------------------------------------|
|
||||
| `/holder` | Parametric **hex cell holder** designer — adjust pack size / cell type, see 3D, download STL for printing. |
|
||||
| `/` | **Busbar** designer — import cell coordinates, group into busbars (parallel + series), export STEP/DXF/SVG for laser cutting. |
|
||||
|
||||
The holder page has a **Design busbars →** button that auto-creates a busbar project pre-loaded with the exact cell coordinates from the configured holder.
|
||||
|
||||
---
|
||||
|
||||
Web tool for designing nickel/copper **busbars** over cylindrical-cell battery packs (21700, 18650, ...) built with hex-shaped cell holders.
|
||||
|
||||
@@ -11,9 +22,10 @@ Workflow:
|
||||
|
||||
## Quick start
|
||||
|
||||
Requires **Python 3.10+**. On Windows / PowerShell:
|
||||
Requires **Python 3.10+** and **OpenSCAD** on the host (only needed for the `/holder` page; the busbar page works without it).
|
||||
|
||||
```powershell
|
||||
# Windows / PowerShell
|
||||
cd busbar-designer
|
||||
python -m venv .venv
|
||||
.\.venv\Scripts\Activate.ps1
|
||||
@@ -21,7 +33,9 @@ pip install -r requirements.txt
|
||||
python app.py
|
||||
```
|
||||
|
||||
Then open <http://localhost:5000> in your browser.
|
||||
OpenSCAD install: Windows — `winget install OpenSCAD.OpenSCAD`; Linux — `apt install openscad`.
|
||||
|
||||
Then open <http://localhost:5000> for the busbar designer, or <http://localhost:5000/holder> for the hex holder designer.
|
||||
|
||||
> First-time install pulls **build123d** (~ 200 MB; bundles OpenCASCADE via OCP) and may take several minutes.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user