Add supports for non-keyboard top case variant

This commit is contained in:
XANTRONIX 2023-11-20 01:12:14 -05:00
parent 1e56b160af
commit ba7a24b16b

View file

@ -72,6 +72,27 @@ module top_case(with_keyboard=false) {
} }
} }
module supports() {
support_length_vert = case_length_bottom - 2 * wall_width;
support_length_horiz = case_width_bottom - 2 * wall_width;
support_height = 0.7500 * wall_height;
support_width = 1.2500;
support_x_interval = (case_width_bottom + 2 * wall_width - support_width) / 7;
support_y_interval = (case_length_bottom + 2 * wall_width - support_width) / 5;
for (x = [support_x_interval: support_x_interval: case_width_bottom - wall_width]) {
translate([x, wall_width - eps, wall_height - wall_width])
support([support_length_vert + 2*eps, support_height], support_width);
}
for (y = [support_y_interval: support_y_interval: case_length_bottom - wall_width]) {
translate([wall_width - eps, y, wall_height - wall_width])
rotate([0, 0, -90])
support([support_length_horiz + 2*eps, support_height], support_width);
}
}
module keyboard_supports() { module keyboard_supports() {
support_width = 1.2500; support_width = 1.2500;
support_height = keyboard_switch_height - wall_width; support_height = keyboard_switch_height - wall_width;
@ -213,6 +234,8 @@ module top_case(with_keyboard=false) {
translate([keyboard_x_offset, keyboard_y_offset, keyboard_deck_z_offset]) translate([keyboard_x_offset, keyboard_y_offset, keyboard_deck_z_offset])
keyboard_deck(wall_width); keyboard_deck(wall_width);
} else {
supports();
} }
} }