diff --git a/readme.md b/readme.md index ed99204..b37b9c6 100644 --- a/readme.md +++ b/readme.md @@ -85,6 +85,7 @@ Axial components for PCBs. | 1 | ```ax_res(res1_4, 47000)``` | Resistor 47000 Ohms 5% 0.25W | | 1 | ```ax_res(res1_2, 8200)``` | Resistor 8200 Ohms 5% 0.5W | | 1 | ```ax_res(res1_2, 8250, tol = 1)``` | Resistor 8250 Ohms 1% 0.5W | +| 1 | ```wire_link(0.8, 10.16)``` | Wire link 0.8mm x 0.4" | Top @@ -2223,6 +2224,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | 2 | ```green_terminal(gt_3p5, 4)``` | Terminal block 4 way 3.5mm | | 1 | ```terminal_35(4)``` | Terminal block 4 way 3.5mm | | 1 | ```pcb(TestPCB)``` | Test PCB | +| 1 | ```wire_link(0.8, 5.08, h = 10.16)``` | Wire link 0.8mm x 0.2" | +| 1 | ```wire_link(0.8, 10.16)``` | Wire link 0.8mm x 0.4" | Top diff --git a/tests/PCB.scad b/tests/PCB.scad index a957f5d..de27bf1 100644 --- a/tests/PCB.scad +++ b/tests/PCB.scad @@ -86,10 +86,13 @@ test_pcb = ["TestPCB", "Test PCB", [ 5, 218, 180, "hdmi"], [ 3, 235, 180, "mini_hdmi"], [ 6, 175, 180, "uSD", [12, 11.5, 1.4]], + + [ 65, 9, 0, "link", inch(0.4)], [ 65, 12, 0, "ax_res", res1_8, 1000], [ 65, 17, 0, "ax_res", res1_4, 10000], [ 65, 22, 0, "ax_res", res1_2, 100000], + [ 80, 9, 0, "link", inch(0.2), inch(0.4)], [ 80, 12, 0, "ax_res", res1_8, 1000000, 1, inch(0.1)], [ 80, 17, 0, "ax_res", res1_4, 100, 2, inch(0.1)], [ 80, 22, 0, "ax_res", res1_2, 10, 10, inch(0.2)], diff --git a/tests/png/pcb.png b/tests/png/pcb.png index 58cbb1a..5131fe6 100644 Binary files a/tests/png/pcb.png and b/tests/png/pcb.png differ diff --git a/vitamins/axial.scad b/vitamins/axial.scad index 521417a..bb3e325 100644 --- a/vitamins/axial.scad +++ b/vitamins/axial.scad @@ -24,6 +24,7 @@ include <../utils/core/core.scad> include <../utils/round.scad> module wire_link(d, l, h = 1, tail = 3) { //! Draw a wire jumper link. + vitamin(str("wire_link(", d, ", ", l, arg(h, 1, "h"), arg(tail, 3, "tail"), "): Wire link ", d, "mm x ", l / inch(1), "\"")); r = d; $fn = 32; @@ -57,13 +58,16 @@ module orientate_axial(length, height, pitch, wire_d) { // Orient horizontal or min_pitch = ceil((length + 1) / inch(0.1)) * inch(0.1); lead_pitch = pitch ? pitch : min_pitch; if(lead_pitch >= min_pitch) { - wire_link(wire_d, lead_pitch, height); + not_on_bom() + wire_link(wire_d, lead_pitch, height); + translate_z(height) rotate([0, 90, 0]) children(); } else { - wire_link(wire_d, lead_pitch, length + 0.7 + wire_d); + not_on_bom() + wire_link(wire_d, lead_pitch, length + 0.7 + wire_d); translate([-pitch / 2, 0, length / 2 + 0.2]) children(); diff --git a/vitamins/led_meter.scad b/vitamins/led_meter.scad index 9ec9a03..5683cd5 100644 --- a/vitamins/led_meter.scad +++ b/vitamins/led_meter.scad @@ -85,7 +85,8 @@ module meter(type, colour = "red", value = "888", display_colour = false) //! Dr translate([0, meter_shunt_y(type), size.z]) vflip() color("#b87333") - wire_link(shunt.y, shunt.x, shunt.z, tail = 2); + not_on_bom() + wire_link(shunt.y, shunt.x, shunt.z, tail = 2); } clearance = 0.1; diff --git a/vitamins/pcb.scad b/vitamins/pcb.scad index 2e9da66..3662944 100644 --- a/vitamins/pcb.scad +++ b/vitamins/pcb.scad @@ -953,6 +953,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon if(show(comp, "led")) led(comp[4], comp[5], 2.6); if(show(comp, "pdip")) pdip(comp[4], comp[5], param(6, false), param(7, inch(0.3))); if(show(comp, "ax_res")) ax_res(comp[4], comp[5], param(6, 5), param(7, 0)); + if(show(comp, "link")) wire_link(l = comp[4], h = param(5, 1), d = param(6, 0.8), tail = param(7, 3)); if(show(comp, "D_plug")) translate_z(d_pcb_offset(comp[4])) d_plug(comp[4], pcb = true); if(show(comp, "molex_hdr")) molex_254(comp[4]); if(show(comp, "jst_xh")) jst_xh_header(jst_xh_header, comp[4], param(5, false), param(6, "white"), param(7, undef));