SOFA KING CLOSE

This commit is contained in:
XANTRONIX 2023-11-15 20:02:49 -05:00
parent e831c31431
commit e4fbde67f2

View file

@ -122,7 +122,7 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
linear_extrude(width) linear_extrude(width)
intersection() { intersection() {
shape(); shape();
square([length, height]); square([length, height], false);
} }
} }
@ -130,6 +130,9 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
support_x_interval = (keyboard_width + 2 * wall_width - support_width) / 6; 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 vertical supports */
upper_support_length = case_length_bottom upper_support_length = case_length_bottom
- keyboard_length - keyboard_length
@ -142,9 +145,22 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
/* Lower vertical supports */ /* 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; 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]) { for (x = [0: support_x_interval: keyboard_width + 2 * wall_width]) {
translate([support_x_offset + x, translate([support_x_offset + x,
upper_support_y_offset, upper_support_y_offset,
@ -156,6 +172,20 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
wall_height - wall_width]) wall_height - wall_width])
support([lower_support_length, keyboard_switch_height], support_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() { module body() {