diff --git a/customizer.scad b/customizer.scad index a481ea5..3950f77 100644 --- a/customizer.scad +++ b/customizer.scad @@ -2846,7 +2846,7 @@ module keytext(text, position, font_size, depth) { woffset = (top_total_key_width()/3.5) * position[0]; hoffset = (top_total_key_height()/3.5) * -position[1]; translate([woffset, hoffset, -depth]){ - color($tertiary_color) linear_extrude(height=$dish_depth){ + color($tertiary_color) linear_extrude(height=$dish_depth + depth){ text(text=text, font=$font, size=font_size, halign="center", valign="center"); } } @@ -4098,23 +4098,30 @@ module inside_features() { } } +// helpers for doubleshot keycaps for now +module inner_total_shape() { + difference() { + inner_shape(); + inside_features(); + } +} + +module outer_total_shape(inset=false) { + outer_shape(); + additive_features(inset) { + children(); + }; +} + // The final, penultimate key generation function. // takes all the bits and glues them together. requires configuration with special variables. module key(inset=false) { difference(){ - union() { - outer_shape(); - additive_features(inset) { - children(); - }; - } + outer_total_shape(inset); if ($inner_shape_type != "disable") { translate([0,0,-SMALLEST_POSSIBLE]) { - difference() { - inner_shape(); - inside_features(); - } + inner_total_shape(); } } diff --git a/src/features/legends.scad b/src/features/legends.scad index e657218..2f0171a 100644 --- a/src/features/legends.scad +++ b/src/features/legends.scad @@ -2,7 +2,7 @@ module keytext(text, position, font_size, depth) { woffset = (top_total_key_width()/3.5) * position[0]; hoffset = (top_total_key_height()/3.5) * -position[1]; translate([woffset, hoffset, -depth]){ - color($tertiary_color) linear_extrude(height=$dish_depth){ + color($tertiary_color) linear_extrude(height=$dish_depth + depth){ text(text=text, font=$font, size=font_size, halign="center", valign="center"); } } diff --git a/src/key.scad b/src/key.scad index 388625f..1f47db8 100644 --- a/src/key.scad +++ b/src/key.scad @@ -201,23 +201,30 @@ module inside_features() { } } +// helpers for doubleshot keycaps for now +module inner_total_shape() { + difference() { + inner_shape(); + inside_features(); + } +} + +module outer_total_shape(inset=false) { + outer_shape(); + additive_features(inset) { + children(); + }; +} + // The final, penultimate key generation function. // takes all the bits and glues them together. requires configuration with special variables. module key(inset=false) { difference(){ - union() { - outer_shape(); - additive_features(inset) { - children(); - }; - } + outer_total_shape(inset); if ($inner_shape_type != "disable") { translate([0,0,-SMALLEST_POSSIBLE]) { - difference() { - inner_shape(); - inside_features(); - } + inner_total_shape(); } }