mirror of
https://github.com/pseudoku/PseudoMakeMeKeyCapProfiles.git
synced 2024-11-10 17:31:09 +00:00
Stem Draft Angle
* Added Stem Draft Angle to be adjusted for injection molding. * Adjusted approach exponents to avoid concavity for injection molding * Added Uniform Phat
This commit is contained in:
parent
6ff933aed5
commit
7d07233a89
2 changed files with 47 additions and 29 deletions
|
@ -6,10 +6,10 @@ use <scad-utils/trajectory_path.scad>
|
||||||
use <sweep.scad>
|
use <sweep.scad>
|
||||||
use <skin.scad>
|
use <skin.scad>
|
||||||
|
|
||||||
//DES (Distorted Elliptical Saddle) Choc Chord version Chicago Stenographer
|
//DES (Distorted Elliptical Saddle) Choc Chord version Chicago Stenographer with sculpted gergo thumb cluter
|
||||||
|
|
||||||
/*Tester */
|
/*Tester */
|
||||||
keycap(keyID = 7, cutLen = 0, Stem =true, Dish = true, Stab = 0 , visualizeDish = false, crossSection = false, homeDot = false, Legends = false);
|
keycap(keyID = 1, cutLen = 0, Stem =true, Dish = true, Stab = 0 , visualizeDish = false, crossSection = false, homeDot = false, Legends = false);
|
||||||
|
|
||||||
// translate([0,19, 0])keycap(keyID = 3, cutLen = 0, Stem =true, Dish = true, visualizeDish = true, crossSection = true, homeDot = false, Legends = false);
|
// translate([0,19, 0])keycap(keyID = 3, cutLen = 0, Stem =true, Dish = true, visualizeDish = true, crossSection = true, homeDot = false, Legends = false);
|
||||||
// translate([0,38, 0])mirror([0,1,0])keycap(keyID = 2, cutLen = 0, Stem =true, Dish = true, visualizeDish = false, crossSection = true, homeDot = false, Legends = false);
|
// translate([0,38, 0])mirror([0,1,0])keycap(keyID = 2, cutLen = 0, Stem =true, Dish = true, visualizeDish = false, crossSection = true, homeDot = false, Legends = false);
|
||||||
|
@ -50,21 +50,28 @@ stemLen = 6;
|
||||||
stemCrossHeight = 1.8;
|
stemCrossHeight = 1.8;
|
||||||
extra_vertical = 0.6;
|
extra_vertical = 0.6;
|
||||||
stemLayers = 50; //resolution of stem to cap top transition
|
stemLayers = 50; //resolution of stem to cap top transition
|
||||||
//#cube([18.16, 18.16, 10], center = true);
|
//#cube([18.16, 18.16, 10], center = true); // sanity check border
|
||||||
|
|
||||||
|
//injection param
|
||||||
|
draftAngle = 2; //degree note:Stem Only
|
||||||
|
//TODO: Add wall thickness transition?
|
||||||
|
|
||||||
|
|
||||||
keyParameters = //keyParameters[KeyID][ParameterID]
|
keyParameters = //keyParameters[KeyID][ParameterID]
|
||||||
[
|
[
|
||||||
// BotWid, BotLen, TWDif, TLDif, keyh, WSft, LSft XSkew, YSkew, ZSkew, WEx, LEx, CapR0i, CapR0f, CapR1i, CapR1f, CapREx, StemEx
|
// BotWid, BotLen, TWDif, TLDif, keyh, WSft, LSft XSkew, YSkew, ZSkew, WEx, LEx, CapR0i, CapR0f, CapR1i, CapR1f, CapREx, StemEx
|
||||||
//Column 0
|
//Column 0
|
||||||
[17.26, 17.26, 4.5, 2, 4.5, 0, .0, 5, -0, -0, 2, 3, 2, 3, 2, 6, 2, 2], //Phat Fingers
|
[17.26, 17.26, 4.5, 2, 4.5, 0, .0, 5, -0, -0, 2, 3, 2, 3, 2, 6, 2, 2], //Phat Fingers
|
||||||
[17.26, 17.26, 7, 4, 5.5, 0, .0, 5, -0, -0, 2, 3, 4, 4, 1, 4, 1, 2], //Chicago Steno R2/R4
|
[17.26, 17.26, 7, 4, 5.5, 0, .0, 5, -0, -0, 2, 3, 4, 4, 1, 4, 2, 2], //Chicago Steno R2/R4
|
||||||
[17.26, 17.26, 7, 4, 4.5, 0, .0, 0, -0, -0, 2, 3, 4, 4, 1, 4, 1, 2], //Chicago Steno R3 flat
|
[17.26, 17.26, 7, 4, 4.5, 0, .0, 0, -0, -0, 2, 3, 4, 4, 1, 4, 2, 2], //Chicago Steno R3 flat
|
||||||
|
|
||||||
[17.06, 35.16, 7, 3, 6.2, 0, 0, -3, -7, -0, 2, 2, 4, 4, 1, 4, 1, 2], //Chicago T0 R1 2u
|
[17.06, 35.16, 7, 3, 6.2, 0, 0, -3, -7, -0, 2, 2, 4, 4, 1, 4, 2, 2], //Chicago T0 R1 2u
|
||||||
[17.06, 17.06, 7, 4, 7.4, 0, .0, -6, 4, 0, 2, 2, 4, 4, 1, 4, 1, 2], //Chicago T0 R2 1u
|
[17.06, 17.06, 7, 4, 7.4, 0, .0, -6, 4, 0, 2, 2, 4, 4, 1, 4, 2, 2], //Chicago T0 R2 1u
|
||||||
[17.06, 35.16, 7, 3, 6.2, 0, 0, -3, 7, -0, 2, 2, 4, 4, 1, 4, 1, 2], //Chicago T1 R2 2u
|
[17.06, 35.16, 7, 3, 6.2, 0, 0, -3, 7, -0, 2, 2, 4, 4, 1, 4, 2, 2], //Chicago T1 R2 2u
|
||||||
[17.06*1.50,17.16, 7, 5, 6.2, 0, 0, -2, 4, 5, 2, 2, 4, 4, 1, 4, 1, 2], //Chicago T2 R1 1.25
|
[17.06*1.50,17.16, 7, 5, 6.2, 0, 0, -2, 4, 5, 2, 2, 4, 4, 1, 4, 2, 2], //Chicago T2 R1 1.25
|
||||||
[17.16*1.25,17.16, 7, 5, 6.8, 0, 0, -2, 3, -0, 2, 2, 4, 4, 1, 4, 1, 2] //Chicago T3 R1 1.25
|
[17.16*1.25,17.16, 7, 5, 6.8, 0, 0, -2, 3, -0, 2, 2, 4, 4, 1, 4, 2, 2], //Chicago T3 R1 1.25
|
||||||
|
|
||||||
|
[17.26, 17.26, 2, 2, 5, 0, .0, 0, -0, -0, 2, 3, 1, 3, 1, 3, 2, 2] //Phat Fingers Uniform
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -81,6 +88,8 @@ dishParameters = //dishParameter[keyID][ParameterID]
|
||||||
[ 14, 4.5, 3, -40, 8, 1.8, 12, 17, 2, 14, 4, 2, -35, 12, 15, 2], //Chicago T1 R2 2u
|
[ 14, 4.5, 3, -40, 8, 1.8, 12, 17, 2, 14, 4, 2, -35, 12, 15, 2], //Chicago T1 R2 2u
|
||||||
[ 6, 4, 2, -35, 8, 1.8, 20, 24, 2, 6, 4, 7, -45, 20, 23, 2], //Chicago T2 R1 1.25
|
[ 6, 4, 2, -35, 8, 1.8, 20, 24, 2, 6, 4, 7, -45, 20, 23, 2], //Chicago T2 R1 1.25
|
||||||
[ 6, 4, 2, -35, 8, 1.8, 15, 17, 2, 6, 4, 7, -45, 15, 15, 2], //Chicago T3 R1 1.25
|
[ 6, 4, 2, -35, 8, 1.8, 15, 17, 2, 6, 4, 7, -45, 15, 15, 2], //Chicago T3 R1 1.25
|
||||||
|
|
||||||
|
[ 6, 3.5, 7, -50, 5, 1.0, 16, 23, 2, 6, 3.5, 7, -50, 16, 23, 2], //Phat Uniform
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -244,7 +253,7 @@ module keycap(keyID = 0, cutLen = 0, visualizeDish = false, rossSection = false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(Stem == true){
|
if(Stem == true){
|
||||||
rotate([0,0,stemRot])choc_stem(KeyHeight(keyID), slop); // generate mx cherry stem, not compatible with box
|
rotate([0,0,stemRot])choc_stem(draftAng = draftAngle); // generate mx cherry stem, not compatible with box
|
||||||
if (Stab != 0){
|
if (Stab != 0){
|
||||||
translate([Stab/2,0,0])rotate([0,0,stemRot])cherry_stem(KeyHeight(keyID), slop);
|
translate([Stab/2,0,0])rotate([0,0,stemRot])cherry_stem(KeyHeight(keyID), slop);
|
||||||
translate([-Stab/2,0,0])rotate([0,0,stemRot])cherry_stem(KeyHeight(keyID), slop);
|
translate([-Stab/2,0,0])rotate([0,0,stemRot])cherry_stem(KeyHeight(keyID), slop);
|
||||||
|
@ -326,20 +335,28 @@ module cherry_stem(depth, slop) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module choc_stem() {
|
|
||||||
|
|
||||||
translate([5.7/2,0,-3.4/2+2])difference(){
|
module choc_stem(draftAng = 2) {
|
||||||
cube([1.25,3, 3.4], center= true);
|
stemHeinght = 3.4;
|
||||||
translate([3.9,0,0])cylinder(d=7,3.4,center = true);
|
|
||||||
translate([-3.9,0,0])cylinder(d=7,3.4,center = true);
|
module Stem() {
|
||||||
|
difference(){
|
||||||
|
hull(){
|
||||||
|
translate([0,0,-stemHeinght/2])cube([1.25-sin(draftAng)*stemHeinght,3-sin(draftAng)*stemHeinght,.001], center= true);
|
||||||
|
translate([0,0,stemHeinght/2])cube([1.25,3,.001], center= true);
|
||||||
}
|
}
|
||||||
translate([-5.7/2,0,-3.4/2+2])difference(){
|
//cuts
|
||||||
cube([1.25,3, 3.4], center= true);
|
translate([3.9,0])cylinder(d1=7+sin(draftAng)*stemHeinght, d2=7,3.5, center = true);
|
||||||
translate([3.9,0,0])cylinder(d=7,3.4,center = true);
|
translate([-3.9,0])cylinder(d1=7+sin(draftAng)*stemHeinght,d2=7,3.5, center = true);
|
||||||
translate([-3.9,0,0])cylinder(d=7,3.4,center = true);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
translate([5.7/2,0,-3.4/2+2])Stem();
|
||||||
|
translate([-5.7/2,0,-3.4/2+2])Stem();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ----- helper functions
|
/// ----- helper functions
|
||||||
function rounded_rectangle_profile(size=[1,1],r=1,fn=32) = [
|
function rounded_rectangle_profile(size=[1,1],r=1,fn=32) = [
|
||||||
for (index = [0:fn-1])
|
for (index = [0:fn-1])
|
||||||
|
|
|
@ -13,20 +13,20 @@ Version 2: Eliptical Rectangle
|
||||||
|
|
||||||
//Stab = 24 for
|
//Stab = 24 for
|
||||||
//TODO add shift
|
//TODO add shift
|
||||||
keycap(keyID = 3, cutLen = 0, Stem =true, Dish = true, Stab = 0 , visualizeDish = false, crossSection = false, homeDot = false, Legends = false);
|
keycap(keyID = 10, cutLen = 0, Stem =true, Dish = true, Stab = 0 , visualizeDish = false, crossSection = false, homeDot = false, Legends = false);
|
||||||
// translate([0,19, 0])keycap(keyID = 3, cutLen = 0, Stem =true, Dish = true, visualizeDish = true, crossSection = true, homeDot = false, Legends = false);
|
// translate([0,19, 0])keycap(keyID = 3, cutLen = 0, Stem =true, Dish = true, visualizeDish = true, crossSection = true, homeDot = false, Legends = false);
|
||||||
// translate([0,38, 0])mirror([0,1,0])keycap(keyID = 2, cutLen = 0, Stem =true, Dish = true, visualizeDish = false, crossSection = true, homeDot = false, Legends = false);
|
// translate([0,38, 0])mirror([0,1,0])keycap(keyID = 2, cutLen = 0, Stem =true, Dish = true, visualizeDish = false, crossSection = true, homeDot = false, Legends = false);
|
||||||
RowHome = [0,2.5,5,2.5,0,0];
|
RowHome = [0,2.5,5,2.5,0,0];
|
||||||
|
|
||||||
//for(Col = [0:5]){
|
for(Col = [2:2]){
|
||||||
// for(Row = [1:3]){
|
for(Row = [1:3]){
|
||||||
// translate([19*Col, 19*Row +RowHome[Col], 0])keycap(keyID = Col*4+Row, cutLen = 0, Stem = true, Dish = true, visualizeDish = false, crossSection = false,Legends = false);
|
translate([19*Col, 19*Row +RowHome[Col], 0])keycap(keyID = Col*4+Row, cutLen = 0, Stem = true, Dish = true, visualizeDish = false, crossSection = false,Legends = false);
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
//
|
//
|
||||||
//// thumb
|
//// thumb
|
||||||
// translate([-15, -4, 0])rotate([0,0,30])keycap(keyID = 0, cutLen = 0, Stem =false, Dish = true, visualizeDish = false, crossSection = false);
|
// translate([-15, -4, 0])rotate([0,0,30])keycap(keyID = 0, cutLen = 0, Stem =false, Dish = true, visualizeDish = false, crossSection = false);
|
||||||
// translate([10, 0, 0])rotate([0,0,15])keycap(keyID = 4, cutLen = 0, Stem =false, Dish = true, visualizeDish = false, crossSection = false);
|
// translate([10, 0, 0])rotate([0,0,15])keycap(key ID = 4, cutLen = 0, Stem =false, Dish = true, visualizeDish = false, crossSection = false);
|
||||||
// translate([31, 2.2, 0])rotate([0,0,0])keycap(keyID = 8, cutLen = 0, Stem =false, Dish = true, visualizeDish = false, crossSection = false);
|
// translate([31, 2.2, 0])rotate([0,0,0])keycap(keyID = 8, cutLen = 0, Stem =false, Dish = true, visualizeDish = false, crossSection = false);
|
||||||
|
|
||||||
//Parameters
|
//Parameters
|
||||||
|
@ -95,7 +95,7 @@ dishParameters = //dishParameter[keyID][ParameterID]
|
||||||
[ 6, 3, 15, -50, 5, 1.7, 9, 15, 2, 5, 4, 13, -30, 9, 16, 2], //R3
|
[ 6, 3, 15, -50, 5, 1.7, 9, 15, 2, 5, 4, 13, -30, 9, 16, 2], //R3
|
||||||
[ 6, 3, 12, -50, 5, 1.7, 9, 15, 2, 6, 4, 13, -30, 9, 16, 2], //R2
|
[ 6, 3, 12, -50, 5, 1.7, 9, 15, 2, 6, 4, 13, -30, 9, 16, 2], //R2
|
||||||
//Column 2
|
//Column 2
|
||||||
[ 5, 4.3, 5, -48, 4, 1.7, 9.3, 10, 2, 6, 3, 13, -30, 9.3, 22, 2], //R5
|
[ 5, 4.3, 5, -48, 4, 1.7, 9.3, 10, 2, 6, 3, 13, -30, 9.3, 24, 2], //R5
|
||||||
[ 6, 3, 18, -50, 5, 1.7, 8.5, 15, 2, 6, 4, 13, -30, 8.5, 15, 2], //R4
|
[ 6, 3, 18, -50, 5, 1.7, 8.5, 15, 2, 6, 4, 13, -30, 8.5, 15, 2], //R4
|
||||||
[ 6, 3, 18, -50, 5, 1.7, 8.5, 15, 2, 5, 4, 13, -30, 8.5, 15, 2], //R3
|
[ 6, 3, 18, -50, 5, 1.7, 8.5, 15, 2, 5, 4, 13, -30, 8.5, 15, 2], //R3
|
||||||
[ 6, 3, 18, -50, 5, 1.7, 8.8, 15, 2, 6, 4, 13, 30, 8.8, 16, 2], //R2
|
[ 6, 3, 18, -50, 5, 1.7, 8.8, 15, 2, 6, 4, 13, 30, 8.8, 16, 2], //R2
|
||||||
|
@ -279,6 +279,7 @@ module keycap(keyID = 0, cutLen = 0, visualizeDish = false, rossSection = false,
|
||||||
if (Stab != 0){
|
if (Stab != 0){
|
||||||
translate([Stab/2,0,0])rotate([0,0,stemRot])cherry_stem(KeyHeight(keyID), slop);
|
translate([Stab/2,0,0])rotate([0,0,stemRot])cherry_stem(KeyHeight(keyID), slop);
|
||||||
translate([-Stab/2,0,0])rotate([0,0,stemRot])cherry_stem(KeyHeight(keyID), slop);
|
translate([-Stab/2,0,0])rotate([0,0,stemRot])cherry_stem(KeyHeight(keyID), slop);
|
||||||
|
//TODO add binding support?
|
||||||
}
|
}
|
||||||
translate([0,0,-.001])skin([for (i=[0:stemLayers-1]) transform(translation(StemTranslation(i,keyID))*rotation(StemRotation(i, keyID)), rounded_rectangle_profile(StemTransform(i, keyID),fn=fn,r=StemRadius(i, keyID)))]); //outer shell
|
translate([0,0,-.001])skin([for (i=[0:stemLayers-1]) transform(translation(StemTranslation(i,keyID))*rotation(StemRotation(i, keyID)), rounded_rectangle_profile(StemTransform(i, keyID),fn=fn,r=StemRadius(i, keyID)))]); //outer shell
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue