Skip to content

Instantly share code, notes, and snippets.

@AkBKukU
Created September 28, 2020 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AkBKukU/08fd558d84e8da780e17868c08cf298f to your computer and use it in GitHub Desktop.
Save AkBKukU/08fd558d84e8da780e17868c08cf298f to your computer and use it in GitHub Desktop.
{
"parameterSets": {
"White Key": {
"Interlock_Depth": "0.5",
"Interlock_Size": "1.5",
"Lip_Depth": "0",
"Lip_Size": "2",
"Metal_Thickness": "1.4",
"Total_Size": "20",
"Total_Thickness": "5.5",
"Wall_Fill": "4",
"Wall_Padding": "1.7",
"Wall_Stop": "7.5",
"Wall_Thickness": "2.4"
},
"Black Key": {
"Interlock_Depth": "0.5",
"Interlock_Size": "4",
"Lip_Depth": "3.5",
"Lip_Size": "2.5",
"Metal_Thickness": "1.4",
"Total_Size": "20",
"Total_Thickness": "4.5",
"Wall_Fill": "4",
"Wall_Padding": "0",
"Wall_Stop": "7.5",
"Wall_Thickness": "2.4"
}
},
"fileFormatVersion": "1",
"parameterSets": "",
"parameterSets": ""
}
// Overall thickness of the part that is printed
Total_Thickness=4.5;
// Total length of the part
Total_Size = 20;
// Thickness of the rear wall
Wall_Thickness = 2.3;
// White key wall padding
Wall_Padding = 1.7;
// Amount of rear wall to press up against for stability
Wall_Stop = 8.1;
// Amount of rear wall to be replaced with new material
Wall_Fill = 4;
// Thickness of the metal mounting plate
Metal_Thickness = 1.4;
// Depth of the interlock to position part in key
Interlock_Depth = 0.5;
// Length of the interlock part (1.9=white)
Interlock_Size = 1.9;
// Depth of the lip on the black key interlock
Lip_Depth = 0.1;
// Length of the lip slot
Lip_Size = 2.5;
module key_insert()
{
Hook_Height=Wall_Thickness*2;
Hook_Bite=Wall_Thickness;
Interlock_Position = Hook_Bite+Wall_Thickness+Wall_Padding;
points = [
// Metal Crux Point
[Wall_Thickness,Wall_Stop+Wall_Fill],
[Wall_Thickness,Wall_Stop+Wall_Fill+Metal_Thickness],
// Hook
[0, Wall_Stop+Wall_Fill+Metal_Thickness+Hook_Height/2],
[0,Wall_Stop+Wall_Fill+Metal_Thickness+Hook_Height],
[Hook_Bite+Wall_Thickness+Wall_Padding, Wall_Stop+Wall_Fill+Metal_Thickness+Hook_Height],
[Hook_Bite+Wall_Thickness+Wall_Padding, Wall_Stop+Wall_Fill],
// Part Mass
[Total_Size,0],
// Black Key Lip
[Hook_Bite+Wall_Thickness+Wall_Padding+Interlock_Size+Lip_Size,0],
[Hook_Bite+Wall_Thickness+Wall_Padding+Interlock_Size+Lip_Size,Lip_Depth],
[Hook_Bite+Wall_Thickness+Wall_Padding+Interlock_Size,Lip_Depth],
[Hook_Bite+Wall_Thickness+Wall_Padding+Interlock_Size,0],
// Interlock Peg
[Interlock_Position+Interlock_Size,0],
[Interlock_Position+Interlock_Size,-Interlock_Depth],
[Interlock_Position,-Interlock_Depth],
[Interlock_Position,0],
// Wall
[Hook_Bite+Wall_Thickness+Wall_Padding,Wall_Stop-Wall_Thickness],
[Hook_Bite+Wall_Padding,Wall_Stop],
[Hook_Bite,Wall_Stop],
];
linear_extrude(Total_Thickness)
polygon(points);
}
key_insert();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment