From 531dc6e201e6b756de267c5417e146652188b379 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Fri, 17 Nov 2023 15:59:21 -0500 Subject: Move measurements to dimensions.scad --- case/dimensions.scad | 36 ++++++++++++++++++++++++++++++++++++ case/top.scad | 38 +------------------------------------- 2 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 case/dimensions.scad diff --git a/case/dimensions.scad b/case/dimensions.scad new file mode 100644 index 0000000..e9d4e77 --- /dev/null +++ b/case/dimensions.scad @@ -0,0 +1,36 @@ +wall_width = 2.5000; +wall_height = 17.2500; + +case_width_top = 317.5000; +case_width_bottom = 319.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_lower_y_offset = (keyboard_y_offset - 2 * wall_width) / 2 + wall_width; +screw_post_middle_y_offset = screw_post_lower_y_offset + 65.00; +screw_post_upper_y_offset = screw_post_middle_y_offset + 65.00; +screw_post_x_offset = (keyboard_x_offset - 2 * wall_width) / 2 + wall_width; + +top_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 + 1.0, screw_post_middle_y_offset, screw_post_corner_height], + [case_width_bottom - screw_post_x_offset - 1.0, 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] +]; diff --git a/case/top.scad b/case/top.scad index 9359815..18f51ef 100644 --- a/case/top.scad +++ b/case/top.scad @@ -1,43 +1,7 @@ $fn = 72; include - -wall_width = 2.5000; -wall_height = 17.2500; - -case_width_top = 317.5000; -case_width_bottom = 319.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_lower_y_offset = (keyboard_y_offset - 2 * wall_width) / 2 + wall_width; -screw_post_middle_y_offset = screw_post_lower_y_offset + 65.00; -screw_post_upper_y_offset = screw_post_middle_y_offset + 65.00; -screw_post_x_offset = (keyboard_x_offset - 2 * wall_width) / 2 + wall_width; - -top_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 + 1.0, screw_post_middle_y_offset, screw_post_corner_height], - [case_width_bottom - screw_post_x_offset - 1.0, 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] -]; +include module top_case(key_switch_sizes, pcb_screw_holes) { keyboard_deck_z_offset = wall_height - keyboard_switch_height; -- cgit v1.2.3