mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2024-11-26 06:45:28 +00:00
Custom stem example
Here's how to implement a custom stem
This commit is contained in:
parent
24e280fe3c
commit
fd68c281c3
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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]) {
|
||||
@ -17,4 +20,4 @@ dcs_row(5) legend("⇪", size=9) key();
|
||||
} */
|
||||
|
||||
// example layout
|
||||
/* preonic_default("dcs"); */
|
||||
/* preonic_default("dcs"); */
|
||||
|
@ -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
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 New Issue
Block a user