mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-27 09:10:02 -05:00
Added cutout for trimpot10.
This commit is contained in:
parent
fbe8533a42
commit
bde8cbe7a6
@ -1925,7 +1925,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| ```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 |
|
||||
| ```trimpot10(vertical, coutout = false)``` | Draw a ten turn trimpot |
|
||||
| ```trimpot10(vertical, cutout = false)``` | Draw a ten turn trimpot |
|
||||
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
||||
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
||||
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
||||
@ -2011,7 +2011,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| ```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 |
|
||||
| ```trimpot10(vertical, coutout = false)``` | Draw a ten turn trimpot |
|
||||
| ```trimpot10(vertical, cutout = false)``` | Draw a ten turn trimpot |
|
||||
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
||||
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
||||
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
||||
|
@ -735,7 +735,7 @@ module standoff(h, d, h2, d2) { //! Draw a standoff
|
||||
}
|
||||
}
|
||||
|
||||
module trimpot10(vertical, coutout = false) { //! Draw a ten turn trimpot
|
||||
module trimpot10(vertical, cutout = false) { //! Draw a ten turn trimpot
|
||||
l = 10;
|
||||
w = 9.5;
|
||||
h = 4.8;
|
||||
@ -746,21 +746,29 @@ module trimpot10(vertical, coutout = false) { //! Draw a ten turn trimpot
|
||||
slot_w = 0.6;
|
||||
slot_h = 0.8;
|
||||
|
||||
module screw_pos()
|
||||
translate([-w / 2 + screw_d / 2, -l / 2, h - screw_d / 2])
|
||||
rotate([90, 0, 0])
|
||||
children();
|
||||
|
||||
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);
|
||||
if(cutout)
|
||||
screw_pos()
|
||||
cylinder(d = screw_d + 1, h = 100);
|
||||
else
|
||||
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);
|
||||
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]) {
|
||||
color(brass)
|
||||
screw_pos() {
|
||||
cylinder(d = screw_d, h = screw_h - slot_h);
|
||||
|
||||
linear_extrude(height = screw_h)
|
||||
@ -770,7 +778,7 @@ module trimpot10(vertical, coutout = false) { //! Draw a ten turn trimpot
|
||||
square([slot_w, screw_d + 1], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb component from description
|
||||
|
Loading…
Reference in New Issue
Block a user