From b73b9346a4d2dbbf56b5eddeba2d9a7b659a814e Mon Sep 17 00:00:00 2001 From: Robert Sheldon Date: Tue, 10 Sep 2019 02:32:18 -0400 Subject: [PATCH] more tweaks but this is looking less likely --- keys.scad | 2 +- src/stem_supports/tines.scad | 2 +- src/stems/choc.scad | 7 +++---- src/supports/flared.scad | 28 +++++++++++++++++++++++----- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/keys.scad b/keys.scad index 309c977..884103e 100644 --- a/keys.scad +++ b/keys.scad @@ -11,7 +11,7 @@ include <./includes.scad> u(1) choc() { - tined_stem_support() sa_row(1){ + flared_support() tined_stem_support() sa_row(1){ $stem_support_height = 2; low_profile() { key(); diff --git a/src/stem_supports/tines.scad b/src/stem_supports/tines.scad index e3385fd..4eb2d59 100644 --- a/src/stem_supports/tines.scad +++ b/src/stem_supports/tines.scad @@ -78,7 +78,7 @@ module tines_support(stem_type, stem_support_height, slop) { } else if (stem_type == "alps"){ centered_tines(stem_support_height); } else if (stem_type == "choc"){ - if ($key_length < 2) translate([0,0,$stem_support_height / 2]) cube([total_key_width($wall_thickness)+$wall_thickness/4, 0.5, $stem_support_height], center = true); + if ($key_length < 2) translate([0,0,$stem_support_height / 2]) cube([total_key_width($wall_thickness)+$wall_thickness/4, 0.42, $stem_support_height], center = true); /* translate([-5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height($wall_thickness), $stem_support_height], center = true); */ /* translate([5.7/2,0,$stem_support_height / 2]) cube([0.5, total_key_height($wall_thickness), $stem_support_height], center = true); */ } diff --git a/src/stems/choc.scad b/src/stems/choc.scad index 57dc741..84bf2c4 100644 --- a/src/stems/choc.scad +++ b/src/stems/choc.scad @@ -1,6 +1,5 @@ module choc_stem(depth, slop){ - echo("slop"); - echo(slop); - translate([-5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop, depth], center=true); - translate([5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop, depth], center=true); + + translate([-5.7/2, 0, depth/2]) cube([1.2 - slop, 3 - slop / 2, depth], center=true); + translate([5.7/2, 0, depth/2]) cube([1.2 - slop, 3 - slop / 2, depth], center=true); } diff --git a/src/supports/flared.scad b/src/supports/flared.scad index 011fe85..05695fe 100644 --- a/src/supports/flared.scad +++ b/src/supports/flared.scad @@ -41,15 +41,33 @@ module flared(stem_type, loft, height) { } } } else if (stem_type == "choc") { - alps_scale = [scale_for_45(height, $choc_stem[0]), scale_for_45(height, $choc_stem[1])]; - translate([-5.7/2,0,0]) linear_extrude(height=height, scale = alps_scale){ + choc_scale = [scale_for_45(height, $choc_stem[0]), scale_for_45(height, $choc_stem[1])]; + // double support + /* + translate([-5.7/2,0,0]) linear_extrude(height=height, scale = choc_scale){ // TODO make a choc_stem() function so it can build in the slop - square($choc_stem - [$stem_slop/2, $stem_slop], center=true); + square($choc_stem - [$stem_slop, $stem_slop], center=true); } - translate([5.7/2,0,0]) linear_extrude(height=height, scale = alps_scale){ - square($choc_stem - [$stem_slop/2, $stem_slop], center=true); + translate([5.7/2,0,0]) linear_extrude(height=height, scale = choc_scale){ + square($choc_stem - [$stem_slop, $stem_slop], center=true); + } */ + + // single support, full width + + /* translate([0,0,0]) linear_extrude(height=height, scale = choc_scale){ + // TODO make a choc_stem() function so it can build in the slop + square([total_key_width($wall_thickness), $choc_stem[1] - $stem_slop], center=true); + } */ + + + // single support, just the stem + new_choc_scale = [scale_for_45(height, $choc_stem[0] + 5.7 - $stem_slop), scale_for_45(height, $choc_stem[1])]; + translate([0,0,0]) linear_extrude(height=height, scale = new_choc_scale){ + // TODO make a choc_stem() function so it can build in the slop + square([$choc_stem[0] + 5.7 - $stem_slop, $choc_stem[1] - $stem_slop], center=true); } + } else { // always render cherry if no stem type. this includes stem_type = false! // this avoids a bug where the keycap is rendered filled when not desired