mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2024-11-26 14:54:21 +00:00
Fixed brimmed(); brim_height was not specified it is now globally declared in settings.scad
Added height to brimmed() which allows easily configuring the height of the brim.
This commit is contained in:
parent
32b6451a7f
commit
d7311d2dac
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user