Files
busbar-designer/scad_snippet.scad
T
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

20 lines
772 B
OpenSCAD

// Drop this at the END of hex_cell.scad to echo per-cell coordinates
// in a format the Busbar Designer importer recognises:
//
// ECHO: "Cell 1: x = 0.0, y = 0.0"
// ECHO: "Cell 2: x = 22.8, y = 0.0"
// ...
//
// Origin (0,0) = center of cell at row=0, col=0.
// Indexing matches the OpenSCAD loop order: row major, then col.
module _echo_cells(centers) {
for (i = [0 : len(centers) - 1]) {
echo(str("Cell ", i + 1, ": x = ", centers[i].x, ", y = ", centers[i].y));
}
}
if (pack_style == "rect") _echo_cells(get_hex_center_points_rect(num_rows, num_cols));
else if (pack_style == "para") _echo_cells(get_hex_center_points_para(num_rows, num_cols));
else if (pack_style == "tria") _echo_cells(get_hex_center_points_tria(num_rows, num_cols));