mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-23 07:13:51 -05:00
Fixed PCB cutout for right angle pin headers.
This commit is contained in:
parent
c99ed98a64
commit
81eb183db9
@ -2476,7 +2476,7 @@ Pin headers and sockets, etc.
|
||||
|:--- |:--- |
|
||||
| ```box_header(type, cols = 1, rows = 1, smt = false, cutout = false)``` | Draw box header |
|
||||
| ```idc_transition(type, cols = 5, skip = [], cutout = false)``` | Draw IDC transition header |
|
||||
| ```jst_xh_header(type, pin_count, right_angle=false, colour = false, pin_colour = false)``` | Draw JST XH connector |
|
||||
| ```jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_colour = false)``` | Draw JST XH connector |
|
||||
| ```pin(type, length = undef)``` | Draw a header pin |
|
||||
| ```pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false, colour)``` | Draw pin header |
|
||||
| ```pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false, colour)``` | Draw pin socket |
|
||||
|
@ -50,8 +50,17 @@ module pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cu
|
||||
ra_offset = 2.4;
|
||||
width = pitch * rows;
|
||||
|
||||
if(cutout)
|
||||
module cutout()
|
||||
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 {
|
||||
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" : ""));
|
||||
|
Loading…
Reference in New Issue
Block a user