Commit 620432a9 authored by Erik Strand's avatar Erik Strand

Extend pad divisions a little off the board

This ensures that the pads get completely divided.
parent b72c7efc
......@@ -28,6 +28,10 @@ public:
}
void set_pixel(int32_t x, int32_t y, uint8_t value = 255) {
x = std::max(-2 * min_cut_thickness_px_, x);
x = std::min(width_px_ + 2 * min_cut_thickness_px_, x);
y = std::max(-2 * min_cut_thickness_px_, y);
y = std::min(height_px_ + 2 * min_cut_thickness_px_, y);
png_writer_.set_pixel(2 * min_cut_thickness_px_ + x,
2 * min_cut_thickness_px_ + height_px_ - y - 1,
value);
......@@ -36,10 +40,6 @@ public:
void draw_int_rectangle(
int32_t x_min, int32_t x_max, int32_t y_min, int32_t y_max, uint8_t value = 255
) {
x_min = std::max(0, x_min);
x_max = std::min(width_px_, x_max);
y_min = std::max(0, y_min);
y_max = std::min(height_px_, y_max);
for (int32_t x = x_min; x < x_max; ++x) {
for (int32_t y = y_min; y < y_max; ++y) {
set_pixel(x, y, value);
......@@ -197,6 +197,28 @@ int main() {
soic_top_y - pad_height - min_cut_thickness,
soic_top_y);
// Extend pad divisions
board.draw_rectangle(cable_pad_width,
cable_pad_width + min_cut_thickness,
-min_cut_thickness,
0,
0);
board.draw_rectangle(cable_pad_width,
cable_pad_width + min_cut_thickness,
height,
height + min_cut_thickness,
0);
board.draw_rectangle(width - cable_pad_width - min_cut_thickness,
width - cable_pad_width,
-min_cut_thickness,
0,
0);
board.draw_rectangle(width - cable_pad_width - min_cut_thickness,
width - cable_pad_width,
height,
height + min_cut_thickness,
0);
board.save("node_board_traces.png");
board.save_outline("node_board_outline.png");
......
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