diff --git a/src/key_transformations.scad b/src/key_transformations.scad index 19c3217..76ecbf8 100644 --- a/src/key_transformations.scad +++ b/src/key_transformations.scad @@ -7,8 +7,9 @@ module translate_u(x=0, y=0, z=0){ translate([x * unit, y*unit, z*unit]) children(); } -module brimmed() { +module brimmed(height = 0.2) { $has_brim = true; + $brim_height = height; children(); } diff --git a/src/settings.scad b/src/settings.scad index 0c18260..7fc90b3 100644 --- a/src/settings.scad +++ b/src/settings.scad @@ -41,6 +41,8 @@ $key_length = 1; $key_height = 1; //print brim for connector to help with bed adhesion $has_brim = false; +//when $has_brim this is the height of the brim +$brim_height = 0.2; // invert dishing. mostly for spacebar $inverted_dish = false; // array of positions of all stems. includes stabilizers as well, for now diff --git a/src/stems/alps.scad b/src/stems/alps.scad index 2babe63..c743bee 100644 --- a/src/stems/alps.scad +++ b/src/stems/alps.scad @@ -1,10 +1,12 @@ module alps_stem(depth, has_brim){ if(has_brim) { - linear_extrude(h=brim_height) { - square($alps_stem * [2,2], center = true); + linear_extrude(height=$brim_height) { + offset(r=1){ + square($alps_stem + [2,2], center=true); + } } } - linear_extrude(h=depth) { + linear_extrude(height=depth) { square($alps_stem, center = true); } } diff --git a/src/stems/cherry.scad b/src/stems/cherry.scad index a02df73..6654cd5 100644 --- a/src/stems/cherry.scad +++ b/src/stems/cherry.scad @@ -10,9 +10,9 @@ module cherry_stem(depth, has_brim) { // brim, if applicable if(has_brim) { - linear_extrude(height = brim_height){ + linear_extrude(height = $brim_height){ offset(r=1){ - square($cherry_stem - [2,2], center=true); + square($cherry_stem + [2,2], center=true); } } } diff --git a/src/stems/rounded_cherry.scad b/src/stems/rounded_cherry.scad index 265b0d2..faadf9f 100644 --- a/src/stems/rounded_cherry.scad +++ b/src/stems/rounded_cherry.scad @@ -3,7 +3,7 @@ module rounded_cherry_stem(depth, has_brim) { union(){ cylinder(d=$rounded_cherry_stem_d, h=depth); if(has_brim) { - cylinder(d=$rounded_cherry_stem_d * 2, h=brim_height); + cylinder(d=$rounded_cherry_stem_d * 2, h=$brim_height); } }