This commit is contained in:
2025-08-23 09:59:24 +02:00
parent 3a3fb829ff
commit 7540ca0285

View File

@@ -100,42 +100,32 @@ leftTopDampener();
} }
module case(){ module case(){
// TODO: Continue with applying baseHeight on all things belo
// Then adjust the shim, aux and pico.
// Last add magnets, don't forget the clearance.
$baseHeight = 6;
module magnets(){ module magnets(){
cylinder(h=$magnetHeight + $clearance, r=$magnetWidth + $clearance / 2); cylinder(h=$magnetHeight + $clearance, r=$magnetWidth + $clearance / 2);
} }
points = [ module aux(){
[0,0], translate([-$shellWidth,75,0])
[0, $switchDistance * $rows], rotate([0,90,0])
[$switchDistance * 2, $switchDistance * $rows], cylinder(h=$shellWidth + 15,r=2.5);
[$switchDistance * 2, $switchDistance * $rows + $fingerStep], translate([0,0,5])
[$switchDistance * 3, $switchDistance * $rows + $fingerStep], magnets();
[$switchDistance * 3, $switchDistance * $rows], }
[$switchDistance * 4, $switchDistance * $rows], module pico(){
[$switchDistance * 4, $switchDistance * $rows - $fingerStep], translate([10, $switchDistance * 5, -2]){
[$switchDistance * 6, $switchDistance * $rows - $fingerStep], union() {
[$switchDistance * 6, 0 - $fingerStep], cube([10,$shellWidth,5]);
[$switchDistance * 4, 0 - $fingerStep], translate([-5,-$shellWidth + $clearance - 40,0])
[$switchDistance * 4, 0], cube([20,$shellWidth + 40,5]);
[$switchDistance * 3, 0],
[$switchDistance * 3, 0 + $fingerStep], }
[$switchDistance * 2, 0 + $fingerStep],
[$switchDistance * 2, 0],
];
difference(){
union() {
linear_extrude($shellHeight){
difference(){
offset(r=$shellWidth/2 + $clearance, chamfer=true) polygon(points);
offset(r=$clearance) polygon(points);
} }
} }
translate([0,0,-3]){ module shim(){
linear_extrude(3){ rotate([90,0,0]) {
offset(r=$shellWidth/2 + $clearance, chamfer=true) polygon(points);
}
}
}
rotate([90,0,0]) {
translate([0,0,-500]){ translate([0,0,-500]){
linear_extrude(99999){ linear_extrude(99999){
polygon( polygon(
@@ -148,23 +138,46 @@ union() {
} }
} }
} }
// usb }
translate([10, $switchDistance * 5, -2]){ 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() {
cube([10,$shellWidth,5]); linear_extrude($shellHeight){
translate([-5,-$shellWidth + $clearance - 40,0]) difference(){
cube([20,$shellWidth + 40,5]); offset(r=$shellWidth/2 + $clearance, chamfer=true) polygon(points);
offset(r=$clearance) polygon(points);
}
}
translate([0,0,-3])
linear_extrude(3){
offset(r=$shellWidth/2 + $clearance, chamfer=true) polygon(points);
}
} }
} }
// aux
translate([-$shellWidth,75,0])
rotate([0,90,0])
cylinder(h=$shellWidth + 15,r=2.5);
translate([0,0,5])
magnets();
} difference(){
body();
shim();
pico();
aux();
}
} }
//topDampeners(); //topDampeners();