From b84254d97279d0449d5eafb83bf718bdc8f7b119 Mon Sep 17 00:00:00 2001 From: Correl Date: Tue, 3 Oct 2023 22:49:11 -0400 Subject: [PATCH] Add space for the rotary encoder pins --- openscad/enclosure.scad | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/openscad/enclosure.scad b/openscad/enclosure.scad index 71f67b4..0b27c53 100644 --- a/openscad/enclosure.scad +++ b/openscad/enclosure.scad @@ -5,7 +5,7 @@ use $fn = $preview ? 30 : 50; plate_margin = 5; -plate_thickness = 1.5; +plate_thickness = 3; // Number of key switches keys = 3; @@ -20,6 +20,8 @@ keyswitch_cutout_width = 14; dial_diameter = 20; dial_base_width = 12.85; dial_base_height = 16.75; +dial_pin_width = 6; +dial_pin_length = 3; // Space between the dial and the keypad dial_distance = 5; @@ -37,9 +39,15 @@ module support_plate() { translate([plate_margin, plate_margin, -1]) { // Dial cutouts translate([(dial_diameter - dial_base_width) / 2, - (dial_diameter - dial_base_height) / 2]) - cube([dial_base_width, dial_base_height, plate_thickness + 2]); - + (dial_diameter - dial_base_height) / 2]) { + union() { + cube([dial_base_width, dial_base_height, plate_thickness + 2]); + translate([(dial_base_width - dial_pin_width) / 2, - dial_pin_length]) { + // Provide a 0.5mm-thick lip to hide the pins + cube([dial_pin_width, dial_base_height + dial_pin_length, plate_thickness + 2 - 1.5]); + } + } + } // Key switch cutouts offset_y = dial_diameter <= key_width ? 0 : (dial_diameter - key_width) / 2; translate([dial_diameter + dial_distance, offset_y]) {