quick stem updates

probably best to pass the stem throw to the stems eh?
This commit is contained in:
Bob 2020-07-10 00:46:05 -04:00
parent 69175f08e4
commit 24e280fe3c
9 changed files with 51 additions and 45 deletions

View file

@ -299,7 +299,7 @@ module support_for(positions, stem_type) {
module stems_for(positions, stem_type) {
keystem_positions(positions) {
color($tertiary_color) stem(stem_type, $total_depth, $stem_slop);
color($tertiary_color) stem(stem_type, $total_depth, $stem_slop, $stem_throw);
if ($stem_support_type != "disable") {
color($quaternary_color) stem_support($stem_support_type, stem_type, $stem_support_height, $stem_slop);
}

View file

@ -4,22 +4,23 @@ include <stems/box_cherry.scad>
include <stems/alps.scad>
include <stems/filled.scad>
include <stems/cherry_stabilizer.scad>
include <stems/custom.scad>
//whole stem, alps or cherry, trimmed to fit
module stem(stem_type, depth, slop){
module stem(stem_type, depth, slop, throw){
if (stem_type == "alps") {
alps_stem(depth, slop);
alps_stem(depth, slop, throw);
} else if (stem_type == "cherry" || stem_type == "costar_stabilizer") {
cherry_stem(depth, slop);
cherry_stem(depth, slop, throw);
} else if (stem_type == "rounded_cherry") {
rounded_cherry_stem(depth, slop);
rounded_cherry_stem(depth, slop, throw);
} else if (stem_type == "box_cherry") {
box_cherry_stem(depth, slop);
box_cherry_stem(depth, slop, throw);
} else if (stem_type == "filled") {
filled_stem();
} else if (stem_type == "cherry_stabilizer") {
cherry_stabilizer_stem(depth, slop);
cherry_stabilizer_stem(depth, slop, throw);
} else if (stem_type == "disable") {
children();
} else {

View file

@ -1,4 +1,4 @@
module alps_stem(depth, has_brim, slop){
module alps_stem(depth, slop, throw){
linear_extrude(height=depth) {
square($alps_stem, center = true);
}

View file

@ -1,7 +1,7 @@
include <../functions.scad>
include <cherry.scad>
module box_cherry_stem(depth, slop) {
module box_cherry_stem(depth, slop, throw) {
difference(){
// outside shape
linear_extrude(height = depth) {

View file

@ -23,7 +23,7 @@ module inside_cherry_cross(slop) {
}
}
module cherry_stem(depth, slop) {
module cherry_stem(depth, slop, throw) {
difference(){
// outside shape
linear_extrude(height = depth) {

View file

@ -15,7 +15,7 @@ module inside_cherry_stabilizer_cross(slop) {
}
}
module cherry_stabilizer_stem(depth, slop) {
module cherry_stabilizer_stem(depth, slop, throw) {
difference(){
// outside shape
linear_extrude(height = depth) {

View file

@ -1,4 +1,4 @@
module filled_stem() {
module filled_stem(_depth, _slop, _throw) {
// I broke the crap out of this stem type due to the changes I made around how stems are differenced
// now that we just take the dish out of stems in order to support stuff like
// bare stem keycaps (and buckling spring eventually) we can't just make a

View file

@ -1,7 +1,7 @@
include <../functions.scad>
include <cherry.scad>
module rounded_cherry_stem(depth, slop) {
module rounded_cherry_stem(depth, slop, throw) {
difference(){
cylinder(d=$rounded_cherry_stem_d, h=depth);