Fixed PCB cutout for right angle pin headers.

This commit is contained in:
Chris Palmer 2020-09-11 12:24:07 +01:00
parent c99ed98a64
commit 81eb183db9
2 changed files with 11 additions and 2 deletions

View File

@ -50,8 +50,17 @@ module pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cu
ra_offset = 2.4; ra_offset = 2.4;
width = pitch * rows; width = pitch * rows;
if(cutout) module cutout()
dogbone_rectangle([cols * pitch + 2 * panel_clearance, rows * pitch + 2 * panel_clearance, 100], center = false); dogbone_rectangle([cols * pitch + 2 * panel_clearance, rows * pitch + 2 * panel_clearance, 100], center = false);
if(cutout) {
if(right_angle)
translate_z(width / 2)
rotate([-90, 0, 180])
cutout();
else
cutout();
}
else { else {
vitamin(str("pin_header(", type[0], ", ", cols, ", ", rows, vitamin(str("pin_header(", type[0], ", ", cols, ", ", rows,
arg(smt, false, "smt"), arg(right_angle, false, "right_angle"), "): Pin header ", cols, " x ", rows, right_angle ? " right_angle" : "")); arg(smt, false, "smt"), arg(right_angle, false, "right_angle"), "): Pin header ", cols, " x ", rows, right_angle ? " right_angle" : ""));