mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-01-17 13:38:16 +01:00
Added 10 turn trimpots
This commit is contained in:
parent
65f320141d
commit
6187d90c57
@ -1923,7 +1923,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions |
|
| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions |
|
||||||
| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer |
|
| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer |
|
||||||
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
||||||
|
| ```standoff(h, d, h2, d2)``` | Draw a standoff |
|
||||||
| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block |
|
| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block |
|
||||||
|
| ```trimpot10(vertical, coutout = false)``` | Draw a ten turn trimpot |
|
||||||
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
||||||
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
||||||
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
||||||
@ -2007,7 +2009,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions |
|
| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions |
|
||||||
| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer |
|
| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer |
|
||||||
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
||||||
|
| ```standoff(h, d, h2, d2)``` | Draw a standoff |
|
||||||
| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block |
|
| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block |
|
||||||
|
| ```trimpot10(vertical, coutout = false)``` | Draw a ten turn trimpot |
|
||||||
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
||||||
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
||||||
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
||||||
|
@ -98,6 +98,8 @@ test_pcb = ["TestPCB", "Test PCB",
|
|||||||
[ 12, 444, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ],
|
[ 12, 444, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ],
|
||||||
[ 10, 470, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
[ 10, 470, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||||
[ 6, 480, 180, "uSD", [12, 11.5, 1.4]],
|
[ 6, 480, 180, "uSD", [12, 11.5, 1.4]],
|
||||||
|
[ 20, -5, 180, "trimpot10"],
|
||||||
|
[ 20, -15, 0, "trimpot10", true],
|
||||||
],
|
],
|
||||||
// accessories
|
// accessories
|
||||||
[]
|
[]
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 90 KiB |
@ -721,7 +721,7 @@ module molex_254(ways) { //! Draw molex header
|
|||||||
cube([0.44, 0.75, above + below], center = true);
|
cube([0.44, 0.75, above + below], center = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
module standoff(h, d, h2, d2) {
|
module standoff(h, d, h2, d2) { //! Draw a standoff
|
||||||
color("white") {
|
color("white") {
|
||||||
cylinder(d = d, h = h);
|
cylinder(d = d, h = h);
|
||||||
|
|
||||||
@ -735,6 +735,44 @@ module standoff(h, d, h2, d2) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module trimpot10(vertical, coutout = false) { //! Draw a ten turn trimpot
|
||||||
|
l = 10;
|
||||||
|
w = 9.5;
|
||||||
|
h = 4.8;
|
||||||
|
foot_w = 1;
|
||||||
|
foot_h = 0.5;
|
||||||
|
screw_h = 1.5;
|
||||||
|
screw_d = 2.25;
|
||||||
|
slot_w = 0.6;
|
||||||
|
slot_h = 0.8;
|
||||||
|
|
||||||
|
translate(vertical ? [0, -h / 2, l / 2] : [0, 0])
|
||||||
|
rotate([vertical ? -90 : 0, 0, 0]) {
|
||||||
|
color("#2CA1FD") {
|
||||||
|
translate([0, -foot_h / 2, foot_h / 2 + h / 2])
|
||||||
|
cube([w, l - foot_h, h - foot_h], center = true);
|
||||||
|
|
||||||
|
for(x = [-1, 1], y = [-1, 1])
|
||||||
|
translate([x * (w - foot_w) / 2, y * (l - foot_w) / 2, h / 2])
|
||||||
|
cube([foot_w, foot_w, h], center = true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
color(brass)
|
||||||
|
translate([-w / 2 + screw_d / 2, -l / 2, h - screw_d / 2])
|
||||||
|
rotate([90, 0, 0]) {
|
||||||
|
cylinder(d = screw_d, h = screw_h - slot_h);
|
||||||
|
|
||||||
|
linear_extrude(height = screw_h)
|
||||||
|
difference() {
|
||||||
|
circle(d = screw_d);
|
||||||
|
|
||||||
|
square([slot_w, screw_d + 1], center = true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb component from description
|
module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb component from description
|
||||||
function show(comp, part) = (comp[3] == part || comp[3] == str("-",part)) && (!cutouts || angle == undef || angle == comp.z);
|
function show(comp, part) = (comp[3] == part || comp[3] == str("-",part)) && (!cutouts || angle == undef || angle == comp.z);
|
||||||
function param(n, default = 0) = len(comp) > n ? comp[n] : default;
|
function param(n, default = 0) = len(comp) > n ? comp[n] : default;
|
||||||
@ -773,6 +811,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
|||||||
if(show(comp, "pcb")) if(!cutouts) translate_z(comp[4]) pcb(comp[5]);
|
if(show(comp, "pcb")) if(!cutouts) translate_z(comp[4]) pcb(comp[5]);
|
||||||
if(show(comp, "standoff")) if(!cutouts) standoff(comp[4], comp[5], comp[6], comp[7]);
|
if(show(comp, "standoff")) if(!cutouts) standoff(comp[4], comp[5], comp[6], comp[7]);
|
||||||
if(show(comp, "uSD")) uSD(comp[4], cutouts);
|
if(show(comp, "uSD")) uSD(comp[4], cutouts);
|
||||||
|
if(show(comp, "trimpot10")) trimpot10(param(4, false), cutouts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user