Bug fix hygrometer_hole() when h > 0.

This commit is contained in:
Chris Palmer 2021-01-08 21:24:06 +00:00
parent 16c1eeef27
commit 545329b875
1 changed files with 15 additions and 14 deletions

View File

@ -34,15 +34,16 @@ hygrometer_hole_r = 21.3;
slot_w = 5.5;
module hygrometer_hole(h = 0) { //! Drill the hole for a hygrometer
round(cnc_bit_r) {
intersection() {
drill(hygrometer_hole_r, h);
extrude_if(h)
round(cnc_bit_r) {
intersection() {
drill(hygrometer_hole_r, 0);
rotate(30)
square([slot_w + 2 * cnc_bit_r, 100], center = true);
rotate(30)
square([slot_w + 2 * cnc_bit_r, 100], center = true);
}
drill((od + 0.2) / 2, 0);
}
drill((od + 0.2) / 2, h);
}
}
function hygrometer_or() = flange_d / 2; //! The outside radius of a hygrometer
@ -54,13 +55,13 @@ module hygrometer() { //! Draw a hygrometer
color(grey(30))
rotate_extrude()
polygon([
[0, 0],
[aperture_d / 2, 0],
[aperture_d / 2, flange_t],
[flange_d2 / 2, flange_t2],
[flange_d / 2, flange_t],
[flange_d / 2, 0],
[od / 2, 0],
[0, 0],
[aperture_d / 2, 0],
[aperture_d / 2, flange_t],
[flange_d2 / 2, flange_t2],
[flange_d / 2, flange_t],
[flange_d / 2, 0],
[od / 2, 0],
[od / 2, -h],
[0, -h]
]);