stem updates; flared top of stem for better support, investigating connecting stem halves

This commit is contained in:
Bob - Home - Windows 2017-09-27 00:16:08 -04:00
parent ef72259005
commit 09ce679f05
2 changed files with 30 additions and 41 deletions

View File

@ -6,8 +6,7 @@
// special variables, but that's a limitation of SCAD we have to work around // special variables, but that's a limitation of SCAD we have to work around
/* TODO: /* TODO:
* fix stem inset * can now measure keycaps very accurately. need to redo measurements: [x] SA [ ] DCS [X] DSA [X] OEM?
* can now measure keycaps very accurately. need to redo measurements: [x] SA [ ] DCS [ ] DSA [ ] OEM?
* make OEM profile from my WASD keyset * make OEM profile from my WASD keyset
* Pregenerated keysets for DCS (rounded tops too intense) WITH rounded spacebar [ ] 60% [ ] TKL [ ] full * Pregenerated keysets for DCS (rounded tops too intense) WITH rounded spacebar [ ] 60% [ ] TKL [ ] full
* Add inset stem to all profiles that need it (DCS?) * Add inset stem to all profiles that need it (DCS?)
@ -93,6 +92,7 @@ module oem_row(n=1) {
$dish_skew_x = 0; $dish_skew_x = 0;
$dish_skew_y = 0; $dish_skew_y = 0;
$top_skew = 1.75; $top_skew = 1.75;
$stem_inset = 1.2;
if (n == 5) { if (n == 5) {
$total_depth = 11.2; $total_depth = 11.2;
@ -122,7 +122,7 @@ module dsa_row(n=3) {
$bottom_key_height = 18.24; // 18.4; $bottom_key_height = 18.24; // 18.4;
$width_difference = 6; // 5.7; $width_difference = 6; // 5.7;
$height_difference = 6; // 5.7; $height_difference = 6; // 5.7;
$total_depth = 8; $total_depth = 8.1;
$top_tilt = (n-1) * 7 - 14; $top_tilt = (n-1) * 7 - 14;
$top_skew = 0; $top_skew = 0;
$dish_type = "spherical"; $dish_type = "spherical";
@ -411,11 +411,6 @@ module legend(text, inset=false) {
rows = [4,3,2,1,5]; rows = [4,3,2,1,5];
translate_u(-.5, -.5) cube([40,115,.3]);
translate([0,0,.3]) { translate_u(0, 0) oem_row(rows[0]) cherry() key();
dsa_row(3) filled() key(); translate_u(0, 1) oem_row(rows[1]) cherry() key();
for (y = [0:4]) {
translate_u(0, y+1) oem_row(rows[y]) filled() key();
}
}

View File

@ -1,26 +1,18 @@
// TODO uh what // TODO uh what
cross_height = 25; stem_depth = 24;
/* [Brim] */
//brim radius. 11 ensconces normal keycap stem in normal keycap
brim_radius = 6;
//brim depth
brim_depth = .3;
module brim(has_brim) { module brim(has_brim) {
if (has_brim) color([0,1,0]) cylinder(r=brim_radius,h=brim_depth); //brim radius. 11 ensconces normal keycap stem in normal keycap
brim_radius = 6;
//brim depth
brim_depth = .3;
if (has_brim) color([0,1,0]) cube([brim_radius, brim_radius, brim_depth]);
} }
module cherry_stem(has_brim) { module cherry_stem(has_brim) {
// cross length // the cross is actually a cube with a side length of 4.4
cross_length = 4.4; cross_length = 4.4;
//extra vertical cross length - the extra length of the up/down bar of the cross
extra_vertical_cross_length = 1.1;
//dimensions of connector
// outer cross extra length in x
extra_outer_cross_width = 2.10;
// outer cross extra length in y
extra_outer_cross_height = 1.0;
// dimensions of cross
// horizontal cross bar width // horizontal cross bar width
horizontal_cross_width = 1.4; horizontal_cross_width = 1.4;
// vertical cross bar width // vertical cross bar width
@ -28,25 +20,29 @@ module cherry_stem(has_brim) {
// cross depth, stem height is 3.4mm // cross depth, stem height is 3.4mm
cross_depth = 4; cross_depth = 4;
total_stem_width = cross_length + 2.10;
total_stem_height = cross_length + 0.5;
total_cross_height = cross_length + 0;
difference(){ difference(){
translate([0,0,stem_inset]) { translate([0,0,stem_inset]) {
brim(has_brim); brim(has_brim);
translate([ translate([0, 0, cross_depth/2]){
-(cross_length+extra_outer_cross_width)/2, cube([total_stem_width, total_stem_height, cross_depth], center=true);
-(cross_length+extra_outer_cross_height)/2,
0 // 6 and 8 are magic numbers I got from trying to make the sides of the flared part of the stem 45 degree overhangs
]) translate([0,0,cross_depth/2]) linear_extrude(height=(stem_depth - cross_depth), scale = [6,8]){
cube([ // the base of the stem, the part the cruciform digs into square([total_stem_width, total_stem_height], center=true);
cross_length+extra_outer_cross_width, }
cross_length+extra_outer_cross_height, }
cross_height
]);
} }
//the cross part of the steam //the cross part of the steam
translate([0,0,(cross_depth)/2 + stem_inset]){ translate([0,0,(cross_depth)/2 + stem_inset]){
cube([vertical_cross_width,cross_length+extra_vertical_cross_length,cross_depth], center=true ); cube([vertical_cross_width, total_cross_height, cross_depth], center=true );
cube([cross_length,horizontal_cross_width,cross_depth], center=true ); cube([cross_length, horizontal_cross_width, cross_depth], center=true );
} }
} }
} }
@ -55,8 +51,6 @@ module cherry_stem_rounded(has_brim) {
// cross length // cross length
cross_length = 4.4; cross_length = 4.4;
//dimensions of connector //dimensions of connector
// outer cross extra length in x
extra_outer_cross_width = 2.10;
// outer cross extra length in y // outer cross extra length in y
extra_outer_cross_height = 1.0; extra_outer_cross_height = 1.0;
// dimensions of cross // dimensions of cross
@ -71,7 +65,7 @@ module cherry_stem_rounded(has_brim) {
union(){ union(){
cylinder( cylinder(
d = cross_length+extra_outer_cross_height, d = cross_length+extra_outer_cross_height,
h = cross_height h = stem_depth
); );
brim(has_brim); brim(has_brim);
} }