Cheeky little refactor

This commit is contained in:
XANTRONIX 2023-11-15 19:10:38 -05:00
parent dd1733d691
commit e831c31431

View file

@ -126,24 +126,7 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
}
}
module body() {
translate([0, 0, wall_height - wall_width])
fascia();
/* Upper */
translate([0, case_length_bottom - wall_width, 0])
cube([case_width_bottom, wall_width, wall_height - wall_width], false);
/* Right */
translate([case_width_bottom - wall_width, 0, 0])
cube([wall_width, case_length_bottom, wall_height - wall_width], false);
/* Lower */
cube([case_width_bottom, wall_width, wall_height - wall_width], false);
/* Left */
cube([wall_width, case_length_bottom, wall_height - wall_width], false);
module supports() {
support_x_interval = (keyboard_width + 2 * wall_width - support_width) / 6;
support_x_offset = keyboard_x_offset - wall_width;
@ -175,6 +158,25 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
}
}
module body() {
translate([0, 0, wall_height - wall_width])
fascia();
/* Upper */
translate([0, case_length_bottom - wall_width, 0])
cube([case_width_bottom, wall_width, wall_height - wall_width], false);
/* Right */
translate([case_width_bottom - wall_width, 0, 0])
cube([wall_width, case_length_bottom, wall_height - wall_width], false);
/* Lower */
cube([case_width_bottom, wall_width, wall_height - wall_width], false);
/* Left */
cube([wall_width, case_length_bottom, wall_height - wall_width], false);
}
module screw_holes() {
pcb_screw_diameter = 2.5;
@ -270,6 +272,8 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
vents();
}
supports();
translate([keyboard_x_offset, keyboard_y_offset, keyboard_deck_z_offset])
keyboard_deck();
}