mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-01-17 05:28:14 +01:00
Wire links can now be sleeved.
This commit is contained in:
parent
abf1f1ab3f
commit
f07fda70cd
@ -110,7 +110,7 @@ Axial components for PCBs.
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `ax_res(type, value, tol = 5, pitch = 0)` | Through hole axial resistor. If `pitch` is zero the minimum is used. If below the minimum the resistor is placed vertical. |
|
||||
| `wire_link(d, l, h = 1, tail = 3)` | Draw a wire jumper link. If `l` is zero then a vertical wire is drawn. |
|
||||
| `wire_link(d, l, h = 1, tail = 3, sleeve = false)` | Draw a wire jumper link. `sleeve` can be a list with the diameter and colour. If `l` is zero then a vertical wire is drawn. |
|
||||
|
||||
![axials](tests/png/axials.png)
|
||||
|
||||
@ -124,6 +124,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, 7.62, h = 0.75, sleeve = [1.5, "red"])` | Wire link 0.8mm x 0.3" with red sleeving |
|
||||
| 1 | `wire_link(0.8, 10.16)` | Wire link 0.8mm x 0.4" |
|
||||
| 1 | `wire_link(0.8, 0, h = 5)` | Wire link 0.8mm x 8mm |
|
||||
|
||||
@ -2501,6 +2502,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 2 | `vero_pin()` | Vero board pin |
|
||||
| 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" |
|
||||
| 1 | `wire_link(0.8, 10.16, h = 0.75, sleeve = [1.5, "red"])` | Wire link 0.8mm x 0.4" with red sleeving |
|
||||
| 1 | `wire_link(0.8, 0, h = 5)` | Wire link 0.8mm x 8mm |
|
||||
|
||||
|
||||
|
@ -105,18 +105,19 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 25, 200, 0, "buzzer", 4.5, 8.5],
|
||||
[ 25, 218, 0, "buzzer"],
|
||||
|
||||
[ 65, 9, 0, "link", inch(0.4)], // flat link
|
||||
[ 65, 12, 0, "ax_res", res1_8, 1000],
|
||||
[ 65, 17, 0, "ax_res", res1_4, 10000],
|
||||
[ 65, 22, 0, "ax_res", res1_2, 100000],
|
||||
[ 55, 22, 0, "vero_pin"],
|
||||
[ 55, 17, 0, "vero_pin", true],
|
||||
[ 55, 9, 0, "link", 0, 5], // Vertical wire
|
||||
[ 45, 5, 0, "link", inch(0.4), 0.75, undef, undef, [1.5, "red"]], // Sleeved link
|
||||
[ 45, 9, 0, "link", inch(0.4)], // Flat link
|
||||
[ 45, 12, 0, "ax_res", res1_8, 1000],
|
||||
[ 45, 17, 0, "ax_res", res1_4, 10000],
|
||||
[ 45, 22, 0, "ax_res", res1_2, 100000],
|
||||
[ 35, 22, 0, "vero_pin"],
|
||||
[ 35, 17, 0, "vero_pin", true],
|
||||
[ 35, 9, 0, "link", 0, 5], // Vertical wire
|
||||
|
||||
[ 80, 9, 0, "link", inch(0.2), inch(0.4)], // Raised link
|
||||
[ 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)],
|
||||
[ 60, 9, 0, "link", inch(0.2), inch(0.4)], // Raised link
|
||||
[ 60, 12, 0, "ax_res", res1_8, 1000000, 1, inch(0.1)],
|
||||
[ 60, 17, 0, "ax_res", res1_4, 100, 2, inch(0.1)],
|
||||
[ 60, 22, 0, "ax_res", res1_2, 10, 10, inch(0.2)],
|
||||
|
||||
[ 33, 110, -90, "rd_xtal", HC49, "4MHz" ],
|
||||
[ 28, 110, -90, "rd_xtal", HC49_4H, "10MHz" ],
|
||||
@ -125,9 +126,9 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 30, 130,-90, "rd_xtal", ACT1100, "40MHz", 0.5 ],
|
||||
[ 30, 150,-90, "rd_xtal", ACT1700, "80MHz", 0.5 ],
|
||||
|
||||
[ 60, 3, 0, "flex"],
|
||||
[ 50, 15, -90, "flat_flex"],
|
||||
[ 40, 15, -90, "flat_flex", true],
|
||||
[ 77, 15, -90, "flex"],
|
||||
[ 95, 15, -90, "flat_flex"],
|
||||
[ 87, 15, -90, "flat_flex", true],
|
||||
|
||||
[ 50, 50, 0, "molex_hdr", 2],
|
||||
[ 50, 60, 0, "jst_xh", 2],
|
||||
|
@ -28,6 +28,10 @@ module axials() {
|
||||
rotate(90)
|
||||
wire_link(0.8, inch(0.4));
|
||||
|
||||
pcb_grid(pcb, 1, 1.5)
|
||||
rotate(90)
|
||||
wire_link(0.8, inch(0.3), 0.75, sleeve = [1.5, "red"]);
|
||||
|
||||
pcb_grid(pcb, 0, 7)
|
||||
wire_link(0.8, 0, 5);
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 276 KiB |
Binary file not shown.
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 185 KiB |
@ -23,8 +23,9 @@
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/round.scad>
|
||||
|
||||
module wire_link(d, l, h = 1, tail = 3) { //! Draw a wire jumper link. If `l` is zero then a vertical wire is drawn.
|
||||
vitamin(str("wire_link(", d, ", ", l, arg(h, 1, "h"), arg(tail, 3, "tail"), "): Wire link ", d, "mm x ", l ? str(l / inch(1), "\"") : str(h + tail,"mm")));
|
||||
module wire_link(d, l, h = 1, tail = 3, sleeve = false) { //! Draw a wire jumper link. `sleeve` can be a list with the diameter and colour. If `l` is zero then a vertical wire is drawn.
|
||||
vitamin(str("wire_link(", d, ", ", l, arg(h, 1, "h"), arg(tail, 3, "tail"), arg(sleeve, false, "sleeve"),
|
||||
"): Wire link ", d, "mm x ", l ? str(l / inch(1), "\"") : str(h + tail,"mm"), sleeve ? str(" with ", sleeve[1], " sleeving") : ""));
|
||||
r = d;
|
||||
$fn = 32;
|
||||
|
||||
@ -48,6 +49,12 @@ module wire_link(d, l, h = 1, tail = 3) { //! Draw a wire jumper link. If `l` is
|
||||
else
|
||||
translate_z(-tail)
|
||||
cylinder(d = d, h = tail + h);
|
||||
|
||||
if(sleeve)
|
||||
color(sleeve[1])
|
||||
translate_z(h)
|
||||
rotate([0, 90, 0])
|
||||
cylinder(d = sleeve[0], h = l - 2 * r, center = true);
|
||||
}
|
||||
|
||||
function ax_res_wattage(type) = type[1]; //! Power rating
|
||||
|
@ -1137,7 +1137,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
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, "rd_xtal")) rd_xtal(type = comp[4], value = param(5, undef), z = param(6, 0), pitch = param(7, undef)); // type, value, z, forced pitch
|
||||
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, "link")) wire_link(l = comp[4], h = param(5, 1), d = param(6, 0.8), tail = param(7, 3), sleeve = param(8, false));
|
||||
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], param(5, 0), param(6, undef));
|
||||
if(show(comp, "jst_xh")) jst_xh_header(jst_xh_header, comp[4], param(5, false), param(6, "white"), param(7, undef));
|
||||
|
Loading…
x
Reference in New Issue
Block a user