Wip case
This commit is contained in:
@@ -100,42 +100,32 @@ leftTopDampener();
|
||||
}
|
||||
|
||||
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(){
|
||||
cylinder(h=$magnetHeight + $clearance, r=$magnetWidth + $clearance / 2);
|
||||
}
|
||||
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],
|
||||
];
|
||||
difference(){
|
||||
union() {
|
||||
linear_extrude($shellHeight){
|
||||
difference(){
|
||||
offset(r=$shellWidth/2 + $clearance, chamfer=true) polygon(points);
|
||||
offset(r=$clearance) polygon(points);
|
||||
module aux(){
|
||||
translate([-$shellWidth,75,0])
|
||||
rotate([0,90,0])
|
||||
cylinder(h=$shellWidth + 15,r=2.5);
|
||||
translate([0,0,5])
|
||||
magnets();
|
||||
}
|
||||
module pico(){
|
||||
translate([10, $switchDistance * 5, -2]){
|
||||
union() {
|
||||
cube([10,$shellWidth,5]);
|
||||
translate([-5,-$shellWidth + $clearance - 40,0])
|
||||
cube([20,$shellWidth + 40,5]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
translate([0,0,-3]){
|
||||
linear_extrude(3){
|
||||
offset(r=$shellWidth/2 + $clearance, chamfer=true) polygon(points);
|
||||
}
|
||||
}
|
||||
}
|
||||
rotate([90,0,0]) {
|
||||
module shim(){
|
||||
rotate([90,0,0]) {
|
||||
translate([0,0,-500]){
|
||||
linear_extrude(99999){
|
||||
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() {
|
||||
cube([10,$shellWidth,5]);
|
||||
translate([-5,-$shellWidth + $clearance - 40,0])
|
||||
cube([20,$shellWidth + 40,5]);
|
||||
|
||||
linear_extrude($shellHeight){
|
||||
difference(){
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user