summaryrefslogtreecommitdiffstats
path: root/case
diff options
context:
space:
mode:
authorXANTRONIX Development2023-11-17 09:47:43 -0500
committerXANTRONIX Development2023-11-17 09:47:43 -0500
commit10571c4df534be97863834d128473327279a55bf (patch)
tree93c603f37a616d5ff1f87acd9e65e8f797b2507b /case
parent5b7959ff80402f43646e5a8bb4639a06f201fd9c (diff)
downloadxantronix-z32-10571c4df534be97863834d128473327279a55bf.tar.gz
xantronix-z32-10571c4df534be97863834d128473327279a55bf.tar.bz2
xantronix-z32-10571c4df534be97863834d128473327279a55bf.zip
Yeah I'm gonna need those
Diffstat (limited to 'case')
-rw-r--r--case/top.scad74
1 files changed, 38 insertions, 36 deletions
diff --git a/case/top.scad b/case/top.scad
index 0e93e3f..7b84ccd 100644
--- a/case/top.scad
+++ b/case/top.scad
@@ -2,18 +2,44 @@ $fn = 72;
include <keyboard.scad>
-module top_case(key_switch_sizes, pcb_screw_holes) {
- case_width_top = 317.5000;
- case_width_bottom = 320.0000;
- case_length_top = 150.0000;
- case_length_bottom = 151.5000;
-
- wall_width = 2.5000;
- wall_height = 17.2500;
-
- keyboard_x_offset = 12.2500;
- keyboard_y_offset = 12.2500;
+wall_width = 2.5000;
+wall_height = 17.2500;
+
+case_width_top = 317.5000;
+case_width_bottom = 320.0000;
+case_length_top = 150.0000;
+case_length_bottom = 151.5000;
+case_height = wall_height;
+
+keyboard_x_offset = 12.2500;
+keyboard_y_offset = 12.2500;
+
+screw_post_diameter_inner = 3.00;
+screw_post_diameter_outer = 6.25;
+screw_post_corner_height = 12.00;
+screw_post_middle_height = 29.30;
+screw_post_upper_y_offset = case_length_bottom - wall_width - 15.00;
+screw_post_middle_y_offset = 72.50;
+screw_post_lower_y_offset = (keyboard_y_offset - 2 * wall_width) / 2 + wall_width;
+screw_post_x_offset = (keyboard_x_offset - 2 * wall_width) / 2 + wall_width;
+
+case_screw_posts = [
+ /* Upper row */
+ [screw_post_x_offset, screw_post_upper_y_offset, screw_post_corner_height],
+ [case_width_bottom / 2, case_length_bottom - 10.0, screw_post_middle_height],
+ [case_width_bottom - screw_post_x_offset, screw_post_upper_y_offset, screw_post_corner_height],
+
+ /* Middle row */
+ [screw_post_x_offset, screw_post_middle_y_offset, screw_post_corner_height],
+ [case_width_bottom - screw_post_x_offset, screw_post_middle_y_offset, screw_post_corner_height],
+
+ /* Bottom row */
+ [screw_post_x_offset, screw_post_lower_y_offset, screw_post_corner_height],
+ [case_width_bottom / 2, screw_post_lower_y_offset, screw_post_corner_height],
+ [case_width_bottom - screw_post_x_offset, screw_post_lower_y_offset, screw_post_corner_height]
+];
+module top_case(key_switch_sizes, pcb_screw_holes) {
keyboard_deck_z_offset = wall_height - keyboard_switch_height;
accent_width = 1.0000;
@@ -28,15 +54,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;
- screw_post_diameter_inner = 3.00;
- screw_post_diameter_outer = 6.25;
- screw_post_corner_height = 12.00;
- screw_post_middle_height = 29.30;
- screw_post_upper_y_offset = case_length_bottom - wall_width - 15.00;
- screw_post_middle_y_offset = 72.50;
- screw_post_lower_y_offset = (keyboard_y_offset - 2 * wall_width) / 2 + wall_width;
- screw_post_x_offset = (keyboard_x_offset - 2 * wall_width) / 2 + wall_width;
-
eps = 0.01;
module fascia() {
@@ -86,23 +103,8 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
}
}
- posts = [
- /* Upper row */
- [screw_post_x_offset, screw_post_upper_y_offset, screw_post_corner_height],
- [case_width_bottom / 2, case_length_bottom - 10.0, screw_post_middle_height],
- [case_width_bottom - screw_post_x_offset, screw_post_upper_y_offset, screw_post_corner_height],
-
- /* Middle row */
- [screw_post_x_offset, screw_post_middle_y_offset, screw_post_corner_height],
- [case_width_bottom - screw_post_x_offset, screw_post_middle_y_offset, screw_post_corner_height],
-
- /* Bottom row */
- [screw_post_x_offset, screw_post_lower_y_offset, screw_post_corner_height],
- [case_width_bottom / 2, screw_post_lower_y_offset, screw_post_corner_height],
- [case_width_bottom - screw_post_x_offset, screw_post_lower_y_offset, screw_post_corner_height]
- ];
- for (post = posts) {
+ for (post = case_screw_posts) {
translate([post[0], post[1], wall_height - wall_width - post[2] - eps])
screw_post(post[2] + eps);
}