3 Commits

Author SHA1 Message Date
wenil 7512393ef4 busbars: FDM test-print export (extruded STL + STEP)
Adds a way to print a busbar on a 3D printer to physically verify
sizing before laser-cutting nickel/copper. The existing "Extrude
solid + 0.2mm" path stays for thin-strip STEP — slicers can't print
0.2mm sheet — so the FDM path has its own thickness input (default
2mm, min 0.5mm).

Backend:
- busbar_export.py: new to_stl() writer. Forces extrude_flag = True
  (STL is inherently 3D) and bumps thickness up to 2mm if the
  incoming value is <0.5mm. Registers under WRITERS["stl"] so the
  existing /api/export/<fmt> route serves it for free.

UI:
- index.html: new "FDM test print" block under the Params panel
  with its own thickness input and two buttons (STL, STEP). The
  existing 'Extrude solid' checkbox + 0.2mm thickness keep
  driving plain "Export STEP".
- styles.css: .fdm-block / .fdm-row / .fdm-buttons styles
  matching the existing panel typography.
- app.js: _exportFdm(fmt) reuses Exporter.exportFormat with a
  shallow-merged params override ({extrude: true, thickness: fdmT}),
  so the on-the-fly request gets the FDM settings without
  mutating the live params state.

Verified: STL render of a 3-cell strip @ 2mm => 73KB binary STL
(opens cleanly in slicers); STEP @ 2mm => 160KB ISO-10303-21
solid; existing flat STEP path unchanged at 15KB.
2026-05-25 14:04:19 +03:00
wenil 6bc922cabf 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
2026-05-24 19:27:50 +03:00
wenil d8cb0dc06d Initial commit: Busbar Designer
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).
2026-05-24 18:59:50 +03:00