From e4fbde67f21186990934be833571f04de9e044b7 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 15 Nov 2023 20:02:49 -0500 Subject: SOFA KING CLOSE --- case/top.scad | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) (limited to 'case') diff --git a/case/top.scad b/case/top.scad index faaa8ba..0cf164c 100644 --- a/case/top.scad +++ b/case/top.scad @@ -122,13 +122,16 @@ module top_case(key_switch_sizes, pcb_screw_holes) { linear_extrude(width) intersection() { shape(); - square([length, height]); + square([length, height], false); } } module supports() { support_x_interval = (keyboard_width + 2 * wall_width - support_width) / 6; - support_x_offset = keyboard_x_offset - wall_width; + support_x_offset = keyboard_x_offset - wall_width; + + support_y_interval = (keyboard_length + 2 * wall_width - support_width) / 4; + support_y_offset = keyboard_y_offset; /* Upper vertical supports */ upper_support_length = case_length_bottom @@ -141,10 +144,23 @@ module top_case(key_switch_sizes, pcb_screw_holes) { + wall_width; /* Lower vertical supports */ - lower_support_length = keyboard_y_offset - 2 * wall_width; - + lower_support_length = keyboard_y_offset - 2 * wall_width; lower_support_y_offset = wall_width; + /* Left horizontal supports */ + left_support_length = keyboard_x_offset - 2 * wall_width; + left_support_x_offset = wall_width; + + /* Right horizontal supports */ + right_support_length = case_width_bottom + - keyboard_width + - keyboard_x_offset + - 2 * wall_width; + + right_support_x_offset = keyboard_x_offset + + keyboard_width + + wall_width; + for (x = [0: support_x_interval: keyboard_width + 2 * wall_width]) { translate([support_x_offset + x, upper_support_y_offset, @@ -156,6 +172,20 @@ module top_case(key_switch_sizes, pcb_screw_holes) { wall_height - wall_width]) support([lower_support_length, keyboard_switch_height], support_width); } + + for (y = [0: support_y_interval: keyboard_length + 2 * wall_width]) { + translate([right_support_x_offset, + support_y_offset + y - wall_width + support_width, + wall_height - wall_width]) + rotate([0, 0, -90]) + support([right_support_length, keyboard_switch_height], support_width); + + /*translate([left_support_x_offset, + support_y_offset + y - wall_width + support_width, + wall_height - wall_width]) + rotate([0, 0, -90]) + support([left_support_length, keyboard_switch_height], support_width);*/ + } } module body() { -- cgit v1.2.3