Added cutout for trimpot10.

This commit is contained in:
Chris Palmer 2020-03-28 10:51:43 +00:00
parent fbe8533a42
commit bde8cbe7a6
2 changed files with 22 additions and 14 deletions

View File

@ -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 |

View File

@ -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,8 +746,17 @@ 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]) {
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);
@ -759,8 +768,7 @@ module trimpot10(vertical, coutout = false) { //! Draw a ten turn trimpot
}
color(brass)
translate([-w / 2 + screw_d / 2, -l / 2, h - screw_d / 2])
rotate([90, 0, 0]) {
screw_pos() {
cylinder(d = screw_d, h = screw_h - slot_h);
linear_extrude(height = screw_h)