This commit is contained in:
2025-08-23 17:22:59 +02:00
parent a125d0f1a5
commit 4780ff2e4f
2 changed files with 41 additions and 27 deletions

Binary file not shown.

View File

@@ -1,4 +1,4 @@
$fn = 32;
$fn = 128;
$space = 3;
$width = 15.5;
@@ -9,10 +9,11 @@ $cut = $holes/2*-1;
$clearance = 0.2;
$switchDistance = $width+ $space;
$shellWidth = 6;
// shell width is set to double of actual shell width and results in haft of the actual value due to division by 2.
// this needs to be fixed
$shellWidth = 12;
$shellHeight = 3.5 + $clearance;
$magnetWidth = 4;
$magnetHeight = 2;
$columns = 6;
@@ -107,10 +108,43 @@ leftTopDampener();
module case(){
// Then adjust the shim, aux and pico.
// Last add magnets, don't forget the clearance.
$baseHeight = 6.2;
$baseHeight = 6.3;
points = [
[0,0],
[0, $switchDistance * $rows],
[$switchDistance * 2, $switchDistance * $rows],
[$switchDistance * 2, $switchDistance * $rows + $fingerStep],
[$switchDistance * 3, $switchDistance * $rows + $fingerStep],
[$switchDistance * 3, $switchDistance * $rows],
[$switchDistance * 4, $switchDistance * $rows],
[$switchDistance * 4, $switchDistance * $rows - $fingerStep],
[$switchDistance * 6, $switchDistance * $rows - $fingerStep],
[$switchDistance * 6, 0 - $fingerStep],
[$switchDistance * 4, 0 - $fingerStep],
[$switchDistance * 4, 0],
[$switchDistance * 3, 0],
[$switchDistance * 3, 0 + $fingerStep],
[$switchDistance * 2, 0 + $fingerStep],
[$switchDistance * 2, 0],
];
module magnets(){
cylinder(h=$magnetHeight + $clearance, r=$magnetWidth + $clearance / 2);
$magnetWidth = 4;
$magnetRadius = ($magnetWidth / 2) + $clearance/2;
$magnetHeight = 2 + $clearance;
$offset = ($shellWidth / 2 / 2) -0.8 ;
// Set Z-origin to align with shell top
translate([0, 0, $shellHeight -$magnetHeight]){
translate(points[0] + [-$offset, -$offset])
cylinder(h=$magnetHeight, r=$magnetRadius);
translate(points[1] + [-$offset, $offset])
cylinder(h=$magnetHeight, r=$magnetRadius);
translate(points[8] + [$offset, $offset])
cylinder(h=$magnetHeight, r=$magnetRadius);
translate(points[9] + [$offset, -$offset])
cylinder(h=$magnetHeight, r=$magnetRadius);
}
}
module aux(){
$topLeftOfPcbToCenterOfAux = 15.4;
@@ -128,9 +162,6 @@ module case(){
// Aux cable housing clearance
cylinder(h=$shellWidth/2,r=$auxCableRadius );
}
// TODO: move magnets to somewhere else.
translate([0,0,5])
magnets();
}
module pico(){
$topLeftEdgeOfPcbToCenterOfUsb = 23;
@@ -168,24 +199,6 @@ module case(){
polygon($shimPoints);
}
module body(){
points = [
[0,0],
[0, $switchDistance * $rows],
[$switchDistance * 2, $switchDistance * $rows],
[$switchDistance * 2, $switchDistance * $rows + $fingerStep],
[$switchDistance * 3, $switchDistance * $rows + $fingerStep],
[$switchDistance * 3, $switchDistance * $rows],
[$switchDistance * 4, $switchDistance * $rows],
[$switchDistance * 4, $switchDistance * $rows - $fingerStep],
[$switchDistance * 6, $switchDistance * $rows - $fingerStep],
[$switchDistance * 6, 0 - $fingerStep],
[$switchDistance * 4, 0 - $fingerStep],
[$switchDistance * 4, 0],
[$switchDistance * 3, 0],
[$switchDistance * 3, 0 + $fingerStep],
[$switchDistance * 2, 0 + $fingerStep],
[$switchDistance * 2, 0],
];
union() {
linear_extrude($shellHeight){
difference(){
@@ -205,6 +218,7 @@ module case(){
shim();
pico();
aux();
magnets();
}
}