// 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));