Wip case
This commit is contained in:
@@ -100,41 +100,31 @@ 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]){
|
|
||||||
linear_extrude(3){
|
|
||||||
offset(r=$shellWidth/2 + $clearance, chamfer=true) polygon(points);
|
|
||||||
}
|
}
|
||||||
}
|
module shim(){
|
||||||
}
|
|
||||||
rotate([90,0,0]) {
|
rotate([90,0,0]) {
|
||||||
translate([0,0,-500]){
|
translate([0,0,-500]){
|
||||||
linear_extrude(99999){
|
linear_extrude(99999){
|
||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user