aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2022-03-25 15:57:17 +0000
committerdakkar <dakkar@thenautilus.net>2022-03-25 15:57:17 +0000
commit91075f4a5d6faf1982f32a9d8e8ccd6334fcdeae (patch)
tree5776e9d6a3b137a808066eca0900deadb5a19108
parentdifferent middle: no bottom (diff)
downloadenv-sensor-91075f4a5d6faf1982f32a9d8e8ccd6334fcdeae.tar.gz
env-sensor-91075f4a5d6faf1982f32a9d8e8ccd6334fcdeae.tar.bz2
env-sensor-91075f4a5d6faf1982f32a9d8e8ccd6334fcdeae.zip
pillars from top
-rw-r--r--enclosure/enclosure.scad51
1 files changed, 43 insertions, 8 deletions
diff --git a/enclosure/enclosure.scad b/enclosure/enclosure.scad
index 1a33123..5b620ed 100644
--- a/enclosure/enclosure.scad
+++ b/enclosure/enclosure.scad
@@ -87,6 +87,9 @@ BUTTON_OFF_X=58;
TOP_Z=2;
+PILLAR_Y=WALL_THICKNESS*2;
+PILLAR_SHRINK=0.05;
+
TOTAL_X=2*WALL_THICKNESS + max(
PM_X + BOT_CABLE_WELL_X + BATT_X,
CO_X + MID_CABLE_WELL_X + BOARD_X
@@ -216,14 +219,32 @@ module switch_well() {
translate([0,0,-SWITCH_SINK-SWITCH_Z/2]) box([SWITCH_X, 30, 30]);
}
+module switch_pillar() {
+ H=BOARD_SINK+TOP_Z/2;
+ translate([0,0,-H/2])
+ cube([SWITCH_X-PILLAR_SHRINK, PILLAR_Y, H], center=true);
+}
+
module reset_well() {
translate([0,0,-RESET_SINK-RESET_Z/2]) box([RESET_X, 30, 30]);
}
+module reset_pillar() {
+ H=BOARD_SINK+TOP_Z/2;
+ translate([0,0,-H/2])
+ cube([RESET_X-PILLAR_SHRINK, PILLAR_Y, H], center=true);
+}
+
module button_well() {
translate([0,0,-BUTTON_SINK-BUTTON_Z/2]) box([BUTTON_X, 30, 30]);
}
+module button_pillar() {
+ H=BOARD_SINK+TOP_Z/2;
+ translate([0,0,-H/2])
+ cube([BUTTON_X-PILLAR_SHRINK, PILLAR_Y, H], center=true);
+}
+
// these will have matching pillars for the top piece, filling them
// down to the right depth; top piece will be printed upside-down
module outside_wells() {
@@ -240,6 +261,16 @@ module outside_wells() {
}
}
+module outside_pillars() {
+ translate([-BOARD_X/2,0,TOP_Z/2]) {
+ translate([0,-TOTAL_Y/2+PILLAR_Y/2,0]) {
+ translate([SWITCH_OFF_X, 0,0]) switch_pillar();
+ translate([RESET_OFF_X, 0,0]) reset_pillar();
+ translate([BUTTON_OFF_X, 0,0]) button_pillar();
+ };
+ }
+}
+
module display_hole() {
cube([DISPLAY_WIN_X, DISPLAY_WIN_Y, 30], center=true);
}
@@ -298,18 +329,22 @@ module top() {
DISP_X_OFF=BOARD_X_OFF - (BOARD_X-DISPLAY_WIN_X)/2 + DISPLAY_X_OFF;
DISP_Y_OFF=BOARD_Y_OFF - (BOARD_Y-DISPLAY_WIN_Y)/2 + DISPLAY_Y_OFF;
- difference() {
- box([TOTAL_X, TOTAL_Y, TOP_Z]);
- screw_holes();
- translate([CO_X_OFF, 0, 0]) co_holes();
- translate([DISP_X_OFF, DISP_Y_OFF, 0]) display_hole();
+ union() {
+ difference() {
+ box([TOTAL_X, TOTAL_Y, TOP_Z]);
+ screw_holes();
+ translate([CO_X_OFF, 0, 0]) co_holes();
+ translate([DISP_X_OFF, DISP_Y_OFF, 0]) display_hole();
+ }
+ translate([BOARD_X_OFF, 0, 0])
+ outside_pillars();
}
}
-
translate([0, TOTAL_Y * 1.2, 0]) bottom();
//translate([0, 0, -BOTTOM_Z-2]) bottom();
middle();
-translate([0, -TOTAL_Y * 1.2, 0]) top();
-//translate([0, 0, +MIDDLE_Z+2]) top();
+translate([0, -TOTAL_Y * 1.2, 0]) rotate([180,0,0]) top();
+
+translate([0, 0, +MIDDLE_Z+2]) top();