mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2025-03-10 00:41:14 +00:00
begin implementing choc stem
This commit is contained in:
parent
1fe1a23f29
commit
e477350153
9 changed files with 67 additions and 4 deletions
14
keys.scad
14
keys.scad
|
@ -14,7 +14,15 @@ include <src/key_types.scad>
|
||||||
include <src/key_transformations.scad>
|
include <src/key_transformations.scad>
|
||||||
include <src/key_helpers.scad>
|
include <src/key_helpers.scad>
|
||||||
|
|
||||||
sa_row(3) u(3) stabilized() {
|
|
||||||
/* %envelope(0); */
|
|
||||||
key();
|
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(); */
|
||||||
|
|
|
@ -291,7 +291,11 @@ module key(inset = false) {
|
||||||
dished($keytop_thickness, $inverted_dish) {
|
dished($keytop_thickness, $inverted_dish) {
|
||||||
translate([0, 0, $stem_inset]) {
|
translate([0, 0, $stem_inset]) {
|
||||||
/* if ($stabilizer_type != "disable") stems_for($stabilizers, $stabilizer_type); */
|
/* if ($stabilizer_type != "disable") stems_for($stabilizers, $stabilizer_type); */
|
||||||
if ($stem_type != "disable") stems_for($stem_positions, $stem_type);
|
if ($stem_type != "disable") {
|
||||||
|
stems_for($stabilizers, $stabilizer_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
stems_for($stem_positions, $stem_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,12 @@ module box_cherry(slop) {
|
||||||
children();
|
children();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module choc(slop) {
|
||||||
|
$stem_slop = slop ? slop : $stem_slop;
|
||||||
|
$stem_type = "choc";
|
||||||
|
children();
|
||||||
|
}
|
||||||
|
|
||||||
module flared_support() {
|
module flared_support() {
|
||||||
$support_type = "flared";
|
$support_type = "flared";
|
||||||
children();
|
children();
|
||||||
|
@ -130,3 +136,11 @@ module bump(depth=undef) {
|
||||||
$key_bump_depth = depth == undef ? $key_bump_depth : depth;
|
$key_bump_depth = depth == undef ? $key_bump_depth : depth;
|
||||||
children();
|
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();
|
||||||
|
}
|
||||||
|
|
|
@ -125,6 +125,9 @@ $legends = [];
|
||||||
// Dimensions of alps stem
|
// Dimensions of alps stem
|
||||||
$alps_stem = [4.45, 2.25];
|
$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
|
// Enable stabilizer stems, to hold onto your cherry or costar stabilizers
|
||||||
$stabilizer_type = "costar_stabilizer"; // [costar_stabilizer, cherry_stabilizer, disable]
|
$stabilizer_type = "costar_stabilizer"; // [costar_stabilizer, cherry_stabilizer, disable]
|
||||||
|
|
||||||
|
|
|
@ -43,5 +43,17 @@ module brim_support(stem_type, stem_support_height, slop) {
|
||||||
|
|
||||||
inside_cherry_cross(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,5 +41,9 @@ module tines_support(stem_type, stem_support_height, slop) {
|
||||||
}
|
}
|
||||||
} else if (stem_type == "alps"){
|
} else if (stem_type == "alps"){
|
||||||
centered_tines(stem_support_height);
|
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); */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ include <stems/box_cherry.scad>
|
||||||
include <stems/alps.scad>
|
include <stems/alps.scad>
|
||||||
include <stems/filled.scad>
|
include <stems/filled.scad>
|
||||||
include <stems/cherry_stabilizer.scad>
|
include <stems/cherry_stabilizer.scad>
|
||||||
|
include <stems/choc.scad>
|
||||||
|
|
||||||
|
|
||||||
//whole stem, alps or cherry, trimmed to fit
|
//whole stem, alps or cherry, trimmed to fit
|
||||||
|
@ -20,6 +21,8 @@ module stem(stem_type, depth, slop){
|
||||||
filled_stem();
|
filled_stem();
|
||||||
} else if (stem_type == "cherry_stabilizer") {
|
} else if (stem_type == "cherry_stabilizer") {
|
||||||
cherry_stabilizer_stem(depth, slop);
|
cherry_stabilizer_stem(depth, slop);
|
||||||
|
} else if (stem_type == "choc") {
|
||||||
|
choc_stem(depth, slop);
|
||||||
} else if (stem_type == "disable") {
|
} else if (stem_type == "disable") {
|
||||||
children();
|
children();
|
||||||
} else {
|
} else {
|
||||||
|
|
6
src/stems/choc.scad
Normal file
6
src/stems/choc.scad
Normal file
|
@ -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);
|
||||||
|
}
|
|
@ -32,6 +32,15 @@ module flared(stem_type, loft, height) {
|
||||||
square(outer_cherry_stabilizer_stem($stem_slop) - [2,2], center=true);
|
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 {
|
} else {
|
||||||
// always render cherry if no stem type. this includes stem_type = false!
|
// 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
|
// this avoids a bug where the keycap is rendered filled when not desired
|
||||||
|
|
Loading…
Add table
Reference in a new issue