mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2025-04-18 13:42:42 +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
5 changed files with 12 additions and 7 deletions
|
@ -7,8 +7,9 @@ module translate_u(x=0, y=0, z=0){
|
||||||
translate([x * unit, y*unit, z*unit]) children();
|
translate([x * unit, y*unit, z*unit]) children();
|
||||||
}
|
}
|
||||||
|
|
||||||
module brimmed() {
|
module brimmed(height = 0.2) {
|
||||||
$has_brim = true;
|
$has_brim = true;
|
||||||
|
$brim_height = height;
|
||||||
children();
|
children();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ $key_length = 1;
|
||||||
$key_height = 1;
|
$key_height = 1;
|
||||||
//print brim for connector to help with bed adhesion
|
//print brim for connector to help with bed adhesion
|
||||||
$has_brim = false;
|
$has_brim = false;
|
||||||
|
//when $has_brim this is the height of the brim
|
||||||
|
$brim_height = 0.2;
|
||||||
// invert dishing. mostly for spacebar
|
// invert dishing. mostly for spacebar
|
||||||
$inverted_dish = false;
|
$inverted_dish = false;
|
||||||
// array of positions of all stems. includes stabilizers as well, for now
|
// array of positions of all stems. includes stabilizers as well, for now
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
module alps_stem(depth, has_brim){
|
module alps_stem(depth, has_brim){
|
||||||
if(has_brim) {
|
if(has_brim) {
|
||||||
linear_extrude(h=brim_height) {
|
linear_extrude(height=$brim_height) {
|
||||||
square($alps_stem * [2,2], center = true);
|
offset(r=1){
|
||||||
|
square($alps_stem + [2,2], center=true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
linear_extrude(h=depth) {
|
}
|
||||||
|
linear_extrude(height=depth) {
|
||||||
square($alps_stem, center = true);
|
square($alps_stem, center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,9 +10,9 @@ module cherry_stem(depth, has_brim) {
|
||||||
|
|
||||||
// brim, if applicable
|
// brim, if applicable
|
||||||
if(has_brim) {
|
if(has_brim) {
|
||||||
linear_extrude(height = brim_height){
|
linear_extrude(height = $brim_height){
|
||||||
offset(r=1){
|
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(){
|
union(){
|
||||||
cylinder(d=$rounded_cherry_stem_d, h=depth);
|
cylinder(d=$rounded_cherry_stem_d, h=depth);
|
||||||
if(has_brim) {
|
if(has_brim) {
|
||||||
cylinder(d=$rounded_cherry_stem_d * 2, h=brim_height);
|
cylinder(d=$rounded_cherry_stem_d * 2, h=$brim_height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue