From f927eb055aa1437440d5e623bd0175375f6552ab Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 15 Nov 2023 18:48:50 -0500 Subject: Into the wilds --- case/top.scad | 30 ++++++++++++++++++++++-------- 1 file 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); } } -- cgit v1.2.3