From d4aa75fc146e3dded0744c7a8b961ad52edbdc54 Mon Sep 17 00:00:00 2001 From: Robert Sheldon Date: Sat, 7 Sep 2019 16:59:29 -0400 Subject: [PATCH 1/6] in implementing choc stem --- customizer.scad | 53 ++++++++++++++++++++++++++++++++++++ keys.scad | 18 ++++++------ src/key_transformations.scad | 14 ++++++++++ src/settings.scad | 3 ++ src/stem_supports/brim.scad | 12 ++++++++ src/stem_supports/tines.scad | 4 +++ src/stems.scad | 3 ++ src/stems/choc.scad | 6 ++++ src/supports/flared.scad | 9 ++++++ 9 files changed, 114 insertions(+), 8 deletions(-) create mode 100644 src/stems/choc.scad diff --git a/customizer.scad b/customizer.scad index 34e9148..682c6c4 100644 --- a/customizer.scad +++ b/customizer.scad @@ -178,6 +178,9 @@ $inset_legend_depth = 0.2; // Dimensions of alps stem $alps_stem = [4.45, 2.25]; +// Dimensions of choc stem +$choc_stem = [1.2, 3]; + // Enable stabilizer stems, to hold onto your cherry or costar stabilizers $stabilizer_type = "costar_stabilizer"; // [costar_stabilizer, cherry_stabilizer, disable] @@ -858,6 +861,12 @@ module box_cherry(slop) { children(); } +module choc(slop) { + $stem_slop = slop ? slop : $stem_slop; + $stem_type = "choc"; + children(); +} + module flared_support() { $support_type = "flared"; children(); @@ -925,6 +934,14 @@ module debug() { %children(); } + +module low_profile() { + /* $total_depth = 5.35; */ + /* extra ugly hack right now to make sure we don't generate keycaps with insufficient throw */ + /* $total_depth = ($total_depth / 2) < 6 ? 6 : $total_depth / 2; */ + $stem_throw = 3; + children(); +} module arrows(profile, rows = [4,4,4,3]) { positions = [[0, 0], [1, 0], [2, 0], [1, 1]]; legends = ["←", "↓", "→", "↑"]; @@ -2078,6 +2095,12 @@ module cherry_stabilizer_stem(depth, slop) { inside_cherry_stabilizer_cross(slop); } } +module choc_stem(depth, slop){ + echo("slop"); + echo(slop); + translate([-5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop/2, depth], center=true); + translate([5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop/2, depth], center=true); +} //whole stem, alps or cherry, trimmed to fit @@ -2094,6 +2117,8 @@ module stem(stem_type, depth, slop){ filled_stem(); } else if (stem_type == "cherry_stabilizer") { cherry_stabilizer_stem(depth, slop); + } else if (stem_type == "choc") { + choc_stem(depth, slop); } else if (stem_type == "disable") { children(); } else { @@ -2322,6 +2347,18 @@ module brim_support(stem_type, stem_support_height, slop) { inside_cherry_cross(slop); } + } else if(stem_type == "choc") { + translate([-5.7/2,0,0]) linear_extrude(height=stem_support_height) { + offset(r=1){ + square($choc_stem + [3,3], center=true); + } + } + + translate([5.7/2,0,0]) linear_extrude(height=stem_support_height) { + offset(r=1){ + square($choc_stem + [3,3], center=true); + } + } } } // a safe theoretical distance between two vertices such that they don't collapse. hard to use @@ -2579,6 +2616,10 @@ 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); + /* 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); */ } } @@ -2932,6 +2973,15 @@ module flared(stem_type, loft, height) { square(outer_cherry_stabilizer_stem($stem_slop) - [2,2], center=true); } } + } 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){ + square($choc_stem - [$stem_slop/2, $stem_slop/2], center=true); + } + + translate([5.7/2,0,0]) linear_extrude(height=height, scale = alps_scale){ + square($choc_stem - [$stem_slop/2, $stem_slop/2], 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 @@ -4473,6 +4523,9 @@ $inset_legend_depth = 0.2; // Dimensions of alps stem $alps_stem = [4.45, 2.25]; +// Dimensions of choc stem +$choc_stem = [1.2, 3]; + // Enable stabilizer stems, to hold onto your cherry or costar stabilizers $stabilizer_type = "costar_stabilizer"; // [costar_stabilizer, cherry_stabilizer, disable] diff --git a/keys.scad b/keys.scad index 768110e..309c977 100644 --- a/keys.scad +++ b/keys.scad @@ -8,13 +8,15 @@ include <./includes.scad> -// example key -dcs_row(5) legend("⇪", size=9) key(); -// example row -/* for (x = [0:1:4]) { - translate_u(0,-x) dcs_row(x) key(); -} */ -// example layout -/* preonic_default("dcs"); */ \ No newline at end of file +u(1) choc() { + tined_stem_support() sa_row(1){ + $stem_support_height = 2; + low_profile() { + key(); + } + } +} + +/* translate_u(1,0) u(1) choc() row_profile("oem") low_profile() key(); */ diff --git a/src/key_transformations.scad b/src/key_transformations.scad index 9bce421..f008e21 100644 --- a/src/key_transformations.scad +++ b/src/key_transformations.scad @@ -109,6 +109,12 @@ module box_cherry(slop) { children(); } +module choc(slop) { + $stem_slop = slop ? slop : $stem_slop; + $stem_type = "choc"; + children(); +} + module flared_support() { $support_type = "flared"; children(); @@ -176,3 +182,11 @@ module debug() { %children(); } + +module low_profile() { + /* $total_depth = 5.35; */ + /* extra ugly hack right now to make sure we don't generate keycaps with insufficient throw */ + /* $total_depth = ($total_depth / 2) < 6 ? 6 : $total_depth / 2; */ + $stem_throw = 3; + children(); +} diff --git a/src/settings.scad b/src/settings.scad index 1ed877f..dc67900 100644 --- a/src/settings.scad +++ b/src/settings.scad @@ -163,6 +163,9 @@ $inset_legend_depth = 0.2; // Dimensions of alps stem $alps_stem = [4.45, 2.25]; +// Dimensions of choc stem +$choc_stem = [1.2, 3]; + // Enable stabilizer stems, to hold onto your cherry or costar stabilizers $stabilizer_type = "costar_stabilizer"; // [costar_stabilizer, cherry_stabilizer, disable] diff --git a/src/stem_supports/brim.scad b/src/stem_supports/brim.scad index 97ae5dc..372fcf3 100644 --- a/src/stem_supports/brim.scad +++ b/src/stem_supports/brim.scad @@ -43,5 +43,17 @@ module brim_support(stem_type, stem_support_height, slop) { inside_cherry_cross(slop); } + } else if(stem_type == "choc") { + translate([-5.7/2,0,0]) linear_extrude(height=stem_support_height) { + offset(r=1){ + square($choc_stem + [3,3], center=true); + } + } + + translate([5.7/2,0,0]) linear_extrude(height=stem_support_height) { + offset(r=1){ + square($choc_stem + [3,3], center=true); + } + } } } diff --git a/src/stem_supports/tines.scad b/src/stem_supports/tines.scad index 56ff739..e3385fd 100644 --- a/src/stem_supports/tines.scad +++ b/src/stem_supports/tines.scad @@ -77,5 +77,9 @@ 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); + /* 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.scad b/src/stems.scad index c53ab91..473c10a 100644 --- a/src/stems.scad +++ b/src/stems.scad @@ -4,6 +4,7 @@ include include include include +include //whole stem, alps or cherry, trimmed to fit @@ -20,6 +21,8 @@ module stem(stem_type, depth, slop){ filled_stem(); } else if (stem_type == "cherry_stabilizer") { cherry_stabilizer_stem(depth, slop); + } else if (stem_type == "choc") { + choc_stem(depth, slop); } else if (stem_type == "disable") { children(); } else { diff --git a/src/stems/choc.scad b/src/stems/choc.scad new file mode 100644 index 0000000..1589880 --- /dev/null +++ b/src/stems/choc.scad @@ -0,0 +1,6 @@ +module choc_stem(depth, slop){ + echo("slop"); + echo(slop); + translate([-5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop/2, depth], center=true); + translate([5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop/2, depth], center=true); +} diff --git a/src/supports/flared.scad b/src/supports/flared.scad index 50dd5c5..03c0e8f 100644 --- a/src/supports/flared.scad +++ b/src/supports/flared.scad @@ -40,6 +40,15 @@ module flared(stem_type, loft, height) { square(outer_cherry_stabilizer_stem($stem_slop) - [2,2], center=true); } } + } 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){ + square($choc_stem - [$stem_slop/2, $stem_slop/2], center=true); + } + + translate([5.7/2,0,0]) linear_extrude(height=height, scale = alps_scale){ + square($choc_stem - [$stem_slop/2, $stem_slop/2], 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 From 2972f7f322e180ce7a7833620550a79d16848ed9 Mon Sep 17 00:00:00 2001 From: Robert Sheldon Date: Sat, 7 Sep 2019 17:10:30 -0400 Subject: [PATCH 2/6] tweak --- src/stems/choc.scad | 4 ++-- src/supports/flared.scad | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/stems/choc.scad b/src/stems/choc.scad index 1589880..57dc741 100644 --- a/src/stems/choc.scad +++ b/src/stems/choc.scad @@ -1,6 +1,6 @@ module choc_stem(depth, slop){ echo("slop"); echo(slop); - translate([-5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop/2, depth], center=true); - translate([5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop/2, 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/2, 3 - slop, depth], center=true); } diff --git a/src/supports/flared.scad b/src/supports/flared.scad index 03c0e8f..011fe85 100644 --- a/src/supports/flared.scad +++ b/src/supports/flared.scad @@ -43,11 +43,12 @@ 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){ - square($choc_stem - [$stem_slop/2, $stem_slop/2], center=true); + // TODO make a choc_stem() function so it can build in the slop + square($choc_stem - [$stem_slop/2, $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/2], center=true); + square($choc_stem - [$stem_slop/2, $stem_slop], center=true); } } else { // always render cherry if no stem type. this includes stem_type = false! From b73b9346a4d2dbbf56b5eddeba2d9a7b659a814e Mon Sep 17 00:00:00 2001 From: Robert Sheldon Date: Tue, 10 Sep 2019 02:32:18 -0400 Subject: [PATCH 3/6] 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 From dfbd88e0654a2db648ae48ac8a2f168927e71008 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 30 Sep 2020 01:35:09 -0400 Subject: [PATCH 4/6] Update choc for prime time mostly just tweaks --- customizer.scad | 65 ++++++++++++++++++++++++------------ src/key_transformations.scad | 34 +++++++++++++------ src/stems/choc.scad | 17 ++++++++-- src/supports/flared.scad | 20 ----------- 4 files changed, 82 insertions(+), 54 deletions(-) diff --git a/customizer.scad b/customizer.scad index 682c6c4..468de64 100644 --- a/customizer.scad +++ b/customizer.scad @@ -861,12 +861,34 @@ module box_cherry(slop) { children(); } -module choc(slop) { - $stem_slop = slop ? slop : $stem_slop; +module choc(slop = 0.05) { + echo("WARN:\n\n * choc support is experimental.\n * $stem_slop is overridden.\n * it is also recommended to print them upside down if you can\n\n"); + $stem_throw = 3; + $stem_slop = slop; + + $bottom_key_width = 18; + $bottom_key_height = 17; + $stem_type = "choc"; children(); } +// a hacky way to make "low profile" keycaps +module low_profile() { + $width_difference = $width_difference / 1.5; + $height_difference = $height_difference / 1.5; + // helps tilted keycaps not have holes if worst comes to worst + $inner_shape_type = "dished"; + + $top_tilt = $top_tilt / 1.25; + + $total_depth = ($total_depth / 2) < 7 ? 7 : $total_depth / 2; + + // just to make sure + $stem_throw = 3; + children(); +} + module flared_support() { $support_type = "flared"; children(); @@ -934,14 +956,6 @@ module debug() { %children(); } - -module low_profile() { - /* $total_depth = 5.35; */ - /* extra ugly hack right now to make sure we don't generate keycaps with insufficient throw */ - /* $total_depth = ($total_depth / 2) < 6 ? 6 : $total_depth / 2; */ - $stem_throw = 3; - children(); -} module arrows(profile, rows = [4,4,4,3]) { positions = [[0, 0], [1, 0], [2, 0], [1, 1]]; legends = ["←", "↓", "→", "↑"]; @@ -2095,11 +2109,21 @@ module cherry_stabilizer_stem(depth, slop) { inside_cherry_stabilizer_cross(slop); } } +separation = 5.7; + +positions = [ + [separation/2, 0], + [-separation/2, 0], +]; + module choc_stem(depth, slop){ - echo("slop"); - echo(slop); - translate([-5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop/2, depth], center=true); - translate([5.7/2, 0, depth/2]) cube([1.2 - slop/2, 3 - slop/2, depth], center=true); + for (position=positions) { + translate([position.x,position.y, depth/2]) single_choc_stem(depth, slop); + } +} + +module single_choc_stem(depth, slop) { + cube([$choc_stem.x - slop, $choc_stem.y - slop, depth], center=true); } @@ -2617,7 +2641,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); */ } @@ -2974,14 +2998,13 @@ 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){ - square($choc_stem - [$stem_slop/2, $stem_slop/2], 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); } - translate([5.7/2,0,0]) linear_extrude(height=height, scale = alps_scale){ - square($choc_stem - [$stem_slop/2, $stem_slop/2], 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 diff --git a/src/key_transformations.scad b/src/key_transformations.scad index f008e21..34c2eeb 100644 --- a/src/key_transformations.scad +++ b/src/key_transformations.scad @@ -109,12 +109,34 @@ module box_cherry(slop) { children(); } -module choc(slop) { - $stem_slop = slop ? slop : $stem_slop; +module choc(slop = 0.05) { + echo("WARN:\n\n * choc support is experimental.\n * $stem_slop is overridden.\n * it is also recommended to print them upside down if you can\n\n"); + $stem_throw = 3; + $stem_slop = slop; + + $bottom_key_width = 18; + $bottom_key_height = 17; + $stem_type = "choc"; children(); } +// a hacky way to make "low profile" keycaps +module low_profile() { + $width_difference = $width_difference / 1.5; + $height_difference = $height_difference / 1.5; + // helps tilted keycaps not have holes if worst comes to worst + $inner_shape_type = "dished"; + + $top_tilt = $top_tilt / 1.25; + + $total_depth = ($total_depth / 2) < 7 ? 7 : $total_depth / 2; + + // just to make sure + $stem_throw = 3; + children(); +} + module flared_support() { $support_type = "flared"; children(); @@ -182,11 +204,3 @@ module debug() { %children(); } - -module low_profile() { - /* $total_depth = 5.35; */ - /* extra ugly hack right now to make sure we don't generate keycaps with insufficient throw */ - /* $total_depth = ($total_depth / 2) < 6 ? 6 : $total_depth / 2; */ - $stem_throw = 3; - children(); -} diff --git a/src/stems/choc.scad b/src/stems/choc.scad index 84bf2c4..1cd5316 100644 --- a/src/stems/choc.scad +++ b/src/stems/choc.scad @@ -1,5 +1,16 @@ -module choc_stem(depth, slop){ +separation = 5.7; - 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); +positions = [ + [separation/2, 0], + [-separation/2, 0], +]; + +module choc_stem(depth, slop){ + for (position=positions) { + translate([position.x,position.y, depth/2]) single_choc_stem(depth, slop); + } +} + +module single_choc_stem(depth, slop) { + cube([$choc_stem.x - slop, $choc_stem.y - slop, depth], center=true); } diff --git a/src/supports/flared.scad b/src/supports/flared.scad index 05695fe..85b8283 100644 --- a/src/supports/flared.scad +++ b/src/supports/flared.scad @@ -41,26 +41,6 @@ module flared(stem_type, loft, height) { } } } else if (stem_type == "choc") { - 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, $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){ From f2f080a51b84706eacc4fb791323da7f3add3eab Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 30 Sep 2020 01:35:16 -0400 Subject: [PATCH 5/6] Update CHANGELOG.md --- CHANGELOG.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6857f25..0f6c2e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,15 @@ CHANGELOG: * side-printed keycaps are first class! you can use the `sideways()` modifier to set up sideways keycaps that have flat sides to print on. * it's much easier to make quick artisans now that the inside of the keycap is differenced from any additive features placed on top * `$linear_extrude_shape` and `$skin_extrude_shape` retired in favor of `$hull_shape_type` - * still todo: add a magic scaling variable so you can scale the whole world up, see if that fixes degeneracy - * still todo: rejigger supports - * still todo: rejigger inner shape. maybe just always make it flat + * added regular_polygon shape and octagonal and hexagonal key profiles + * added beta kailh choc + * Finally got ISO Enter working correctly! + * STILL TODO: + * add a magic scaling variable so you can scale the whole world up, see if that fixes degeneracy + * Make flat stem support default + * make flat inner shape default + * new_key_structure changes doesn't take into account support stems properly; fix + * support repositioning to print on the back surface of the keycap + * implement regular polygon for skin extrusions + * switch to skin-shaped extrusions by default + * kailh choc has a non-square key unit; should I get that working for layouts etc? From 961e940f2656018e75566ea39a8a7c0e42980195 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 30 Sep 2020 01:49:15 -0400 Subject: [PATCH 6/6] reinstate keys.scad --- keys.scad | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/keys.scad b/keys.scad index 884103e..768110e 100644 --- a/keys.scad +++ b/keys.scad @@ -8,15 +8,13 @@ include <./includes.scad> +// example key +dcs_row(5) legend("⇪", size=9) key(); +// example row +/* for (x = [0:1:4]) { + translate_u(0,-x) dcs_row(x) key(); +} */ -u(1) choc() { - flared_support() tined_stem_support() sa_row(1){ - $stem_support_height = 2; - low_profile() { - key(); - } - } -} - -/* translate_u(1,0) u(1) choc() row_profile("oem") low_profile() key(); */ +// example layout +/* preonic_default("dcs"); */ \ No newline at end of file