summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}
}