1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-03-14 19:59:45 +01:00

Added vero_pin PCB component.

This commit is contained in:
Chris Palmer 2021-09-11 11:44:36 +01:00
parent e952aa7840
commit 181c6ac624
3 changed files with 33 additions and 2 deletions

View File

@ -2367,6 +2367,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `usb_B(cutout = false)` | Draw USB B connector |
| `usb_C(cutout = false)` | Draw USB C connector |
| `usb_uA(cutout = false)` | Draw USB micro A connector |
| `vero_pin(cropped = false)` | Draw a vero pin |
![pcb](tests/png/pcb.png)
@ -2417,7 +2418,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `green_terminal(gt_5x17, 3)` | Terminal block 3 way 5mm |
| 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 | `pcb(test_pcb)` | Test PCB |
| 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" |
@ -2480,7 +2482,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `barrel_jack(cutout = false)` | Draw barrel power jack |
| `block(size, colour, makes_cutout, cutouts)` | Draw a coloured cube to represent a random PCB component |
| `buzzer(height, diameter, colour)` | Draw PCB buzzer with specified height, diameter and colour |
| `chip(length, width, thickness, colour, cutout = false)` | Draw a coloured cube to represent a chip, or other rectangular component |
| `chip(length, width, thickness, colour, cutout = false)` | Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero |
| `flat_flex(type, cutout = false)` | Draw flat flexistrip connector as used on RPI0 |
| `flex(cutout = false)` | Draw flexistrip connector |
| `hdmi(type, cutout = false)` | Draw HDMI socket |
@ -2508,6 +2510,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `usb_B(cutout = false)` | Draw USB B connector |
| `usb_C(cutout = false)` | Draw USB C connector |
| `usb_uA(cutout = false)` | Draw USB micro A connector |
| `vero_pin(cropped = false)` | Draw a vero pin |
![pcbs](tests/png/pcbs.png)

View File

@ -97,6 +97,8 @@ test_pcb = ["test_pcb", "Test PCB",
[ 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],
[ 80, 9, 0, "link", inch(0.2), inch(0.4)],
[ 80, 12, 0, "ax_res", res1_8, 1000000, 1, inch(0.1)],

View File

@ -904,6 +904,31 @@ module molex_254(ways) { //! Draw molex header
cube([0.44, 0.75, above + below], center = true);
}
module vero_pin(cropped = false) { //! Draw a vero pin
vitamin("vero_pin(): Vero board pin");
l = cropped ? 7.5 : 10;
d = 1.03;
spline_d = 1.23;
spline_h = 1.3;
collar_d = 1.72;
collar_h = 0.65;
above = 3.6;
splines = 6;
spline_w = 0.3;
color(silver) {
translate_z(-l + above + collar_h)
cylinder(d = d, h = l, $fn = 32);
cylinder(d = collar_d, h = collar_h);
for(i = [0 : splines - 1])
rotate(360 * i / splines)
translate([d / 2, 0, -spline_h])
rounded_rectangle([spline_d - d, spline_w, spline_h], spline_w / 4, center = false);
}
}
module standoff(h, d, h2, d2) { //! Draw a standoff
color("white") {
cylinder(d = d, h = h);
@ -1030,6 +1055,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "buzzer")) buzzer(param(4, 9), param(5, 12), param(6, grey(20)));
if(show(comp, "smd_res")) smd_resistor(comp[4], comp[5]);
if(show(comp, "smd_cap")) smd_capacitor(comp[4], comp[5]);
if(show(comp, "vero_pin")) vero_pin(param(4, false));
}
}
}