Don't need explicit false on cube() center arg

This commit is contained in:
XANTRONIX 2023-11-19 21:23:25 -05:00
parent 8a62f33c34
commit e4576d124a
2 changed files with 18 additions and 18 deletions

View file

@ -60,7 +60,7 @@ module keyboard_deck(wall_width) {
if (key_switch_size <= 0.5) { if (key_switch_size <= 0.5) {
cube([keyboard_switch_width * key_switch_size, cube([keyboard_switch_width * key_switch_size,
keyboard_switch_length, keyboard_switch_length,
wall_width], false); wall_width]);
} else { } else {
hole_width = key_switch_footprint[0]; hole_width = key_switch_footprint[0];
hole_length = key_switch_footprint[1]; hole_length = key_switch_footprint[1];
@ -69,10 +69,10 @@ module keyboard_deck(wall_width) {
hole_y = plate_length / 2 - hole_length / 2; hole_y = plate_length / 2 - hole_length / 2;
difference() { difference() {
cube([plate_width + eps, plate_length + eps, wall_width], false); cube([plate_width + eps, plate_length + eps, wall_width]);
translate([hole_x, hole_y, -eps]) translate([hole_x, hole_y, -eps])
cube([hole_width, hole_length, wall_width + 2*eps], false); cube([hole_width, hole_length, wall_width + 2*eps]);
} }
} }
} }
@ -82,19 +82,19 @@ module keyboard_deck(wall_width) {
/* Upper */ /* Upper */
translate([-wall_width, keyboard_pcb_length, 0]) translate([-wall_width, keyboard_pcb_length, 0])
cube([keyboard_pcb_width + 2 * wall_width, wall_width, wall_height + eps], false); cube([keyboard_pcb_width + 2 * wall_width, wall_width, wall_height + eps]);
/* Right */ /* Right */
translate([keyboard_pcb_width, -wall_width, 0]) translate([keyboard_pcb_width, -wall_width, 0])
cube([wall_width, keyboard_pcb_length + 2 * wall_width, wall_height + eps], false); cube([wall_width, keyboard_pcb_length + 2 * wall_width, wall_height + eps]);
/* Lower */ /* Lower */
translate([-wall_width, -wall_width, 0]) translate([-wall_width, -wall_width, 0])
cube([keyboard_pcb_width + 2 * wall_width, wall_width, wall_height + eps], false); cube([keyboard_pcb_width + 2 * wall_width, wall_width, wall_height + eps]);
/* Left */ /* Left */
translate([-wall_width, -wall_width, 0]) translate([-wall_width, -wall_width, 0])
cube([wall_width, keyboard_pcb_length + 2 * wall_width, wall_height + eps], false); cube([wall_width, keyboard_pcb_length + 2 * wall_width, wall_height + eps]);
} }
module body() { module body() {

View file

@ -22,10 +22,10 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
module fascia() { module fascia() {
difference() { difference() {
cube([case_width_bottom, case_length_bottom, wall_width], false); cube([case_width_bottom, case_length_bottom, wall_width]);
translate([keyboard_x_offset, keyboard_y_offset, -eps]) translate([keyboard_x_offset, keyboard_y_offset, -eps])
cube([keyboard_pcb_width, keyboard_pcb_length, wall_width + 2*eps], false); cube([keyboard_pcb_width, keyboard_pcb_length, wall_width + 2*eps]);
} }
} }
@ -34,7 +34,7 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
x = vent_x_first + (i * (vent_width + vent_width)); x = vent_x_first + (i * (vent_width + vent_width));
translate([x, vent_y_offset-eps, wall_height - vent_height]) translate([x, vent_y_offset-eps, wall_height - vent_height])
cube([vent_width, vent_length+2*eps, vent_height+eps], false); cube([vent_width, vent_length+2*eps, vent_height+eps]);
} }
} }
@ -42,15 +42,15 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
for (y = [accent_y_bottom: accent_y_stride: case_length_bottom]) { for (y = [accent_y_bottom: accent_y_stride: case_length_bottom]) {
/* Top */ /* Top */
translate([-eps, y - eps, wall_height - accent_depth]) translate([-eps, y - eps, wall_height - accent_depth])
cube([case_width_bottom+2*eps, accent_width + 2*eps, accent_depth+eps], false); cube([case_width_bottom+2*eps, accent_width + 2*eps, accent_depth+eps]);
/* Right */ /* Right */
translate([case_width_bottom - accent_depth, y, -eps]) translate([case_width_bottom - accent_depth, y, -eps])
cube([accent_depth+eps, accent_width+eps, wall_height+2*eps], false); cube([accent_depth+eps, accent_width+eps, wall_height+2*eps]);
/* Left */ /* Left */
translate([-eps, y, -eps]) translate([-eps, y, -eps])
cube([accent_depth+eps, accent_width, wall_height+2*eps], false); cube([accent_depth+eps, accent_width, wall_height+2*eps]);
} }
} }
@ -225,20 +225,20 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
/* Upper */ /* Upper */
translate([wall_width, case_length_bottom - wall_width_upper, 0]) translate([wall_width, case_length_bottom - wall_width_upper, 0])
cube([case_width_bottom - 2*wall_width, wall_width_upper, wall_lip_upper], false); cube([case_width_bottom - 2*wall_width, wall_width_upper, wall_lip_upper]);
translate([0, case_length_bottom - wall_width, wall_lip_upper - eps]) translate([0, case_length_bottom - wall_width, wall_lip_upper - eps])
cube([case_width_bottom, wall_width, wall_height - wall_lip_upper + eps], false); cube([case_width_bottom, wall_width, wall_height - wall_lip_upper + eps]);
/* Right */ /* Right */
translate([case_width_bottom - wall_width, 0, 0]) translate([case_width_bottom - wall_width, 0, 0])
cube([wall_width, case_length_bottom, wall_height], false); cube([wall_width, case_length_bottom, wall_height]);
/* Lower */ /* Lower */
cube([case_width_bottom, wall_width, wall_height], false); cube([case_width_bottom, wall_width, wall_height]);
/* Left */ /* Left */
cube([wall_width, case_length_bottom, wall_height], false); cube([wall_width, case_length_bottom, wall_height]);
} }
difference() { difference() {