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
/* TODO:
* fix stem inset
* can now measure keycaps very accurately. need to redo measurements: [x] SA [ ] DCS [ ] DSA [ ] OEM?
* can now measure keycaps very accurately. need to redo measurements: [x] SA [ ] DCS [X] DSA [X] OEM?
* make OEM profile from my WASD keyset
* Pregenerated keysets for DCS (rounded tops too intense) WITH rounded spacebar [ ] 60% [ ] TKL [ ] full
* 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_y = 0;
$top_skew = 1.75;
$stem_inset = 1.2;
if (n == 5) {
$total_depth = 11.2;
@ -122,7 +122,7 @@ module dsa_row(n=3) {
$bottom_key_height = 18.24; // 18.4;
$width_difference = 6; // 5.7;
$height_difference = 6; // 5.7;
$total_depth = 8;
$total_depth = 8.1;
$top_tilt = (n-1) * 7 - 14;
$top_skew = 0;
$dish_type = "spherical";
@ -411,11 +411,6 @@ module legend(text, inset=false) {
rows = [4,3,2,1,5];
translate_u(-.5, -.5) cube([40,115,.3]);
translate([0,0,.3]) {
dsa_row(3) filled() key();
for (y = [0:4]) {
translate_u(0, y+1) oem_row(rows[y]) filled() key();
}
}
translate_u(0, 0) oem_row(rows[0]) cherry() key();
translate_u(0, 1) oem_row(rows[1]) cherry() key();

View File

@ -1,26 +1,18 @@
// TODO uh what
cross_height = 25;
/* [Brim] */
stem_depth = 24;
module brim(has_brim) {
//brim radius. 11 ensconces normal keycap stem in normal keycap
brim_radius = 6;
//brim depth
brim_depth = .3;
module brim(has_brim) {
if (has_brim) color([0,1,0]) cylinder(r=brim_radius,h=brim_depth);
if (has_brim) color([0,1,0]) cube([brim_radius, brim_radius, brim_depth]);
}
module cherry_stem(has_brim) {
// cross length
// the cross is actually a cube with a side length of 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_width = 1.4;
// vertical cross bar width
@ -28,24 +20,28 @@ module cherry_stem(has_brim) {
// cross depth, stem height is 3.4mm
cross_depth = 4;
total_stem_width = cross_length + 2.10;
total_stem_height = cross_length + 0.5;
total_cross_height = cross_length + 0;
difference(){
translate([0,0,stem_inset]) {
brim(has_brim);
translate([
-(cross_length+extra_outer_cross_width)/2,
-(cross_length+extra_outer_cross_height)/2,
0
])
cube([ // the base of the stem, the part the cruciform digs into
cross_length+extra_outer_cross_width,
cross_length+extra_outer_cross_height,
cross_height
]);
translate([0, 0, cross_depth/2]){
cube([total_stem_width, total_stem_height, cross_depth], center=true);
// 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]){
square([total_stem_width, total_stem_height], center=true);
}
}
}
//the cross part of the steam
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 );
}
}
@ -55,8 +51,6 @@ module cherry_stem_rounded(has_brim) {
// cross length
cross_length = 4.4;
//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
@ -71,7 +65,7 @@ module cherry_stem_rounded(has_brim) {
union(){
cylinder(
d = cross_length+extra_outer_cross_height,
h = cross_height
h = stem_depth
);
brim(has_brim);
}