Custom stem example

Here's how to implement a custom stem
This commit is contained in:
Bob 2020-07-10 01:14:24 -04:00
parent 24e280fe3c
commit fd68c281c3
4 changed files with 25 additions and 3 deletions

View File

@ -1950,10 +1950,15 @@ module cherry_stabilizer_stem(depth, slop, throw) {
}
}
thickness = .84;
inner_stem_size = [6,4];
outer_stem_size = inner_stem_size + [thickness, thickness];
module custom_stem(depth, slop, throw){
linear_extrude(height=depth) {
square($alps_stem, center = true);
difference() {
square(outer_stem_size + [slop,slop], center = true);
square(inner_stem_size + [slop,slop], center = true);
}
}
}

View File

@ -9,7 +9,10 @@ include <./includes.scad>
// example key
dcs_row(5) legend("⇪", size=9) key();
/* $stem_throw = 1; */
$stem_type = "custom";
$outset_legends = true;
dcs_row(5) front_legend("j") key();
// example row
/* for (x = [0:1:4]) {

View File

@ -21,6 +21,8 @@ module stem(stem_type, depth, slop, throw){
filled_stem();
} else if (stem_type == "cherry_stabilizer") {
cherry_stabilizer_stem(depth, slop, throw);
} else if (stem_type == "custom") {
custom_stem(depth, slop, throw);
} else if (stem_type == "disable") {
children();
} else {

12
src/stems/custom.scad Normal file
View File

@ -0,0 +1,12 @@
thickness = .84;
inner_stem_size = [6,4];
outer_stem_size = inner_stem_size + [thickness, thickness];
module custom_stem(depth, slop, throw){
linear_extrude(height=depth) {
difference() {
square(outer_stem_size + [slop,slop], center = true);
square(inner_stem_size + [slop,slop], center = true);
}
}
}