diff --git a/node_board/main.cpp b/node_board/main.cpp index 35f54336b10a9188395c7df45c22c2bb233461cd..3db1107dd4cc3d63b0557eef604b07aaded225c5 100644 --- a/node_board/main.cpp +++ b/node_board/main.cpp @@ -4,6 +4,12 @@ //-------------------------------------------------------------------------------------------------- // All length measurements are in mm. int main() { + // reused vars... dirty C style + double pad_x_min; + double pad_x_max; + double pad_y_min; + double pad_y_max; + double ppmm = 50; auto const to_px = [ppmm](double x) { return static_cast<uint32_t>(ppmm * x); @@ -34,11 +40,11 @@ int main() { double const soic_pos_x = 0.5 * (width - 3 * soic_pitch - pad_width); double const soic_pos_y = 0.5 * (height - soic_height); for (uint32_t i = 0; i < 4; ++i) { - double const pad_x_min = soic_pos_x + i * soic_pitch; - double const pad_x_max = pad_x_min + pad_width; + pad_x_min = soic_pos_x + i * soic_pitch; + pad_x_max = pad_x_min + pad_width; - double pad_y_min = soic_pos_y; - double pad_y_max = pad_y_min + pad_height; + pad_y_min = soic_pos_y; + pad_y_max = pad_y_min + pad_height; for (uint32_t x = to_px(pad_x_min); x < to_px(pad_x_max); ++x) { for (uint32_t y = to_px(pad_y_min); y < to_px(pad_y_max); ++y) { set_pixel(x, y); @@ -54,6 +60,19 @@ int main() { } } + // Cable attachment dims + double const min_cut_thickness = 0.4; + double const cable_pad_height = 2.4; + pad_x_min = (width - 2 * min_cut_thickness) / 3; + pad_x_max = pad_x_min + min_cut_thickness; + pad_y_min = 0; + pad_y_max = pad_y_min + cable_pad_height; + for (uint32_t x = to_px(pad_x_min); x < to_px(pad_x_max); ++x) { + for (uint32_t y = to_px(pad_y_min); y < to_px(pad_y_max); ++y) { + set_pixel(x, y); + } + } + png_writer.write("node_board_traces.png"); return 0;