more tweaks but this is looking less likely

This commit is contained in:
Robert Sheldon 2019-09-10 02:32:18 -04:00
parent c23784ec08
commit 34ce2c2d21
4 changed files with 28 additions and 11 deletions

View File

@ -17,7 +17,7 @@ include <src/key_helpers.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();

View File

@ -42,7 +42,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); */
}

View File

@ -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);
}

View File

@ -33,15 +33,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