Commit 1bb43333 authored by Erik Strand's avatar Erik Strand

Start drawing cable pads... but actually negatives oops

parent a815498e
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment