mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2025-02-16 22:37:03 +00:00
Custom stem example
Here's how to implement a custom stem
This commit is contained in:
parent
24e280fe3c
commit
fd68c281c3
4 changed files with 25 additions and 3 deletions
|
@ -1950,10 +1950,15 @@ module cherry_stabilizer_stem(depth, slop, throw) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
thickness = .84;
|
thickness = .84;
|
||||||
|
inner_stem_size = [6,4];
|
||||||
|
outer_stem_size = inner_stem_size + [thickness, thickness];
|
||||||
|
|
||||||
module custom_stem(depth, slop, throw){
|
module custom_stem(depth, slop, throw){
|
||||||
linear_extrude(height=depth) {
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,10 @@ include <./includes.scad>
|
||||||
|
|
||||||
|
|
||||||
// example key
|
// 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
|
// example row
|
||||||
/* for (x = [0:1:4]) {
|
/* for (x = [0:1:4]) {
|
||||||
|
@ -17,4 +20,4 @@ dcs_row(5) legend("⇪", size=9) key();
|
||||||
} */
|
} */
|
||||||
|
|
||||||
// example layout
|
// example layout
|
||||||
/* preonic_default("dcs"); */
|
/* preonic_default("dcs"); */
|
||||||
|
|
|
@ -21,6 +21,8 @@ module stem(stem_type, depth, slop, throw){
|
||||||
filled_stem();
|
filled_stem();
|
||||||
} else if (stem_type == "cherry_stabilizer") {
|
} else if (stem_type == "cherry_stabilizer") {
|
||||||
cherry_stabilizer_stem(depth, slop, throw);
|
cherry_stabilizer_stem(depth, slop, throw);
|
||||||
|
} else if (stem_type == "custom") {
|
||||||
|
custom_stem(depth, slop, throw);
|
||||||
} else if (stem_type == "disable") {
|
} else if (stem_type == "disable") {
|
||||||
children();
|
children();
|
||||||
} else {
|
} else {
|
||||||
|
|
12
src/stems/custom.scad
Normal file
12
src/stems/custom.scad
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue