Wip case
This commit is contained in:
BIN
rev2/3d-models/case-right.stl
Normal file
BIN
rev2/3d-models/case-right.stl
Normal file
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
$fn = 32;
|
$fn = 128;
|
||||||
|
|
||||||
$space = 3;
|
$space = 3;
|
||||||
$width = 15.5;
|
$width = 15.5;
|
||||||
@@ -9,10 +9,11 @@ $cut = $holes/2*-1;
|
|||||||
$clearance = 0.2;
|
$clearance = 0.2;
|
||||||
$switchDistance = $width+ $space;
|
$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;
|
$shellHeight = 3.5 + $clearance;
|
||||||
$magnetWidth = 4;
|
|
||||||
$magnetHeight = 2;
|
|
||||||
|
|
||||||
|
|
||||||
$columns = 6;
|
$columns = 6;
|
||||||
@@ -107,10 +108,43 @@ leftTopDampener();
|
|||||||
module case(){
|
module case(){
|
||||||
// Then adjust the shim, aux and pico.
|
// Then adjust the shim, aux and pico.
|
||||||
// Last add magnets, don't forget the clearance.
|
// 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(){
|
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(){
|
module aux(){
|
||||||
$topLeftOfPcbToCenterOfAux = 15.4;
|
$topLeftOfPcbToCenterOfAux = 15.4;
|
||||||
@@ -128,9 +162,6 @@ module case(){
|
|||||||
// Aux cable housing clearance
|
// Aux cable housing clearance
|
||||||
cylinder(h=$shellWidth/2,r=$auxCableRadius );
|
cylinder(h=$shellWidth/2,r=$auxCableRadius );
|
||||||
}
|
}
|
||||||
// TODO: move magnets to somewhere else.
|
|
||||||
translate([0,0,5])
|
|
||||||
magnets();
|
|
||||||
}
|
}
|
||||||
module pico(){
|
module pico(){
|
||||||
$topLeftEdgeOfPcbToCenterOfUsb = 23;
|
$topLeftEdgeOfPcbToCenterOfUsb = 23;
|
||||||
@@ -168,24 +199,6 @@ module case(){
|
|||||||
polygon($shimPoints);
|
polygon($shimPoints);
|
||||||
}
|
}
|
||||||
module body(){
|
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() {
|
union() {
|
||||||
linear_extrude($shellHeight){
|
linear_extrude($shellHeight){
|
||||||
difference(){
|
difference(){
|
||||||
@@ -205,6 +218,7 @@ module case(){
|
|||||||
shim();
|
shim();
|
||||||
pico();
|
pico();
|
||||||
aux();
|
aux();
|
||||||
|
magnets();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user