diff options
author | XANTRONIX Development | 2023-11-16 21:55:48 -0500 |
---|---|---|
committer | XANTRONIX Development | 2023-11-16 21:55:48 -0500 |
commit | 58f75e5fd2cd444e83e992c2197b6199a09fc938 (patch) | |
tree | a2cdc15bc8ea4a06ab4a88281846a0d4a2acff91 | |
parent | d2c614543719a065fa1f4d19b30f860565e85ba5 (diff) | |
download | xantronix-z32-58f75e5fd2cd444e83e992c2197b6199a09fc938.tar.gz xantronix-z32-58f75e5fd2cd444e83e992c2197b6199a09fc938.tar.bz2 xantronix-z32-58f75e5fd2cd444e83e992c2197b6199a09fc938.zip |
Fix keyboard deck height, placement
-rw-r--r-- | case/keyboard.scad | 10 | ||||
-rw-r--r-- | case/top.scad | 18 |
2 files changed, 15 insertions, 13 deletions
diff --git a/case/keyboard.scad b/case/keyboard.scad index 0c4f14e..8afd40b 100644 --- a/case/keyboard.scad +++ b/case/keyboard.scad @@ -70,21 +70,23 @@ module keyboard_deck(wall_width) { } module walls() { + wall_height = keyboard_switch_height - wall_width; + /* Upper */ translate([-wall_width, keyboard_pcb_length, 0]) - cube([keyboard_pcb_width + 2 * wall_width, wall_width, keyboard_switch_height], false); + cube([keyboard_pcb_width + 2 * wall_width, wall_width, wall_height], false); /* Right */ translate([keyboard_pcb_width, -wall_width, 0]) - cube([wall_width, keyboard_pcb_length + 2 * wall_width, keyboard_switch_height], false); + cube([wall_width, keyboard_pcb_length + 2 * wall_width, wall_height], false); /* Lower */ translate([-wall_width, -wall_width, 0]) - cube([keyboard_pcb_width + 2 * wall_width, wall_width, keyboard_switch_height], false); + cube([keyboard_pcb_width + 2 * wall_width, wall_width, wall_height], false); /* Left */ translate([-wall_width, -wall_width, 0]) - cube([wall_width, keyboard_pcb_length + 2 * wall_width, keyboard_switch_height], false); + cube([wall_width, keyboard_pcb_length + 2 * wall_width, keyboard_switch_height - wall_width], false); } module body() { diff --git a/case/top.scad b/case/top.scad index c304127..758dd2e 100644 --- a/case/top.scad +++ b/case/top.scad @@ -14,7 +14,7 @@ module top_case(key_switch_sizes, pcb_screw_holes) { keyboard_x_offset = 12.2500; keyboard_y_offset = 12.2500; - keyboard_deck_z_offset = wall_height - wall_width - keyboard_switch_height; + keyboard_deck_z_offset = wall_height - keyboard_switch_height; accent_width = 1.0000; accent_depth = 0.5; @@ -28,8 +28,6 @@ module top_case(key_switch_sizes, pcb_screw_holes) { vent_x_first = keyboard_x_offset + keyboard_pcb_width - vent_count * (vent_width + vent_width); vent_y_offset = case_length_bottom - vent_length; - support_width = 1.2500; - screw_post_diameter_inner = 3.00; screw_post_diameter_outer = 6.25; screw_post_corner_height = 12.00; @@ -111,6 +109,10 @@ module top_case(key_switch_sizes, pcb_screw_holes) { } module supports() { + support_width = 1.2500; + support_height = keyboard_switch_height - wall_width; + aspect_ratio = 3.75 / 12.0; + module support(dimensions, width) { length = dimensions[0]; height = dimensions[1]; @@ -129,8 +131,6 @@ module top_case(key_switch_sizes, pcb_screw_holes) { module shape() { /* Height ratio of lower aspect to upper aspect */ - aspect_ratio = 3.75 / 12.0; - aspect_upper_height = height; aspect_lower_height = aspect_ratio * height; @@ -196,12 +196,12 @@ module top_case(key_switch_sizes, pcb_screw_holes) { translate([support_x_offset + x, upper_support_y_offset - eps, wall_height - wall_width]) - support([upper_support_length + 2*eps, keyboard_switch_height], support_width); + support([upper_support_length + 2*eps, support_height], support_width); translate([support_x_offset + x, lower_support_y_offset - eps, wall_height - wall_width]) - support([lower_support_length + 2*eps, keyboard_switch_height], support_width); + support([lower_support_length + 2*eps, support_height], support_width); } for (y = [0: support_y_interval: keyboard_pcb_length + 2 * wall_width]) { @@ -209,13 +209,13 @@ module top_case(key_switch_sizes, pcb_screw_holes) { support_y_offset + y - wall_width + support_width, wall_height - wall_width]) rotate([0, 0, -90]) - support([right_support_length + 2*eps, keyboard_switch_height], support_width); + support([right_support_length + 2*eps, support_height], support_width); translate([left_support_x_offset - eps, support_y_offset + y - wall_width + support_width, wall_height - wall_width]) rotate([0, 0, -90]) - support([left_support_length + 2*eps, keyboard_switch_height], support_width); + support([left_support_length + 2*eps, support_height], support_width); } } |