summaryrefslogtreecommitdiffstats
path: root/case
diff options
context:
space:
mode:
authorXANTRONIX Development2023-11-15 18:48:50 -0500
committerXANTRONIX Development2023-11-15 18:48:50 -0500
commitf927eb055aa1437440d5e623bd0175375f6552ab (patch)
tree9f8f4bd587982fb0e7b8c72a393796001a6a9b9f /case
parentfeb53663fe6c3930aeef49125c157fc6c52896ef (diff)
downloadxantronix-z32-f927eb055aa1437440d5e623bd0175375f6552ab.tar.gz
xantronix-z32-f927eb055aa1437440d5e623bd0175375f6552ab.tar.bz2
xantronix-z32-f927eb055aa1437440d5e623bd0175375f6552ab.zip
Into the wilds
Diffstat (limited to 'case')
-rw-r--r--case/top.scad30
1 files changed, 22 insertions, 8 deletions
diff --git a/case/top.scad b/case/top.scad
index 62473bd..2d92679 100644
--- a/case/top.scad
+++ b/case/top.scad
@@ -115,7 +115,13 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
right_triangle(height);
}
- translate([0, length, 0]) rotate([-90, 0, -90]) linear_extrude(width) shape();
+ translate([0, length, 0])
+ rotate([-90, 0, -90])
+ linear_extrude(width)
+ intersection() {
+ shape();
+ square([length, height]);
+ }
}
module body() {
@@ -136,9 +142,10 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
/* Left */
cube([wall_width, case_length_bottom, wall_height - wall_width], false);
- /* Upper vertical supports */
- upper_support_x_interval = (keyboard_width + wall_width + 1.25) / 6;
+ support_x_interval = (keyboard_width + wall_width + 1.25) / 6;
+ support_x_offset = keyboard_x_offset - wall_width;
+ /* Upper vertical supports */
upper_support_length = case_length_bottom
- keyboard_length
- keyboard_y_offset
@@ -148,14 +155,21 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
+ keyboard_length
+ wall_width;
- upper_support_x_offset = keyboard_x_offset - wall_width;
+ /* Lower vertical supports */
+ lower_support_length = keyboard_y_offset - 2 * wall_width;
- for (x = [0: upper_support_x_interval: keyboard_width + 2 * wall_width]) {
- translate([upper_support_x_offset + x,
+ lower_support_y_offset = wall_width;
+
+ for (x = [0: support_x_interval: keyboard_width + 2 * wall_width]) {
+ translate([support_x_offset + x,
upper_support_y_offset,
wall_height - wall_width])
- support([upper_support_length, keyboard_switch_height],
- 1.25);
+ support([upper_support_length, keyboard_switch_height], 1.25);
+
+ translate([support_x_offset + x,
+ lower_support_y_offset,
+ wall_height - wall_width])
+ support([lower_support_length, keyboard_switch_height], 1.25);
}
}