Wip case
This commit is contained in:
@@ -100,9 +100,46 @@ 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);
|
||||||
}
|
}
|
||||||
|
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]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module shim(){
|
||||||
|
rotate([90,0,0]) {
|
||||||
|
translate([0,0,-500]){
|
||||||
|
linear_extrude(99999){
|
||||||
|
polygon(
|
||||||
|
[
|
||||||
|
[0 - $shellWidth/2, -3],
|
||||||
|
[$switchDistance * 6 + $switchDistance/2,0],
|
||||||
|
[$switchDistance * 6 + $shellWidth/2, -3]
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module body(){
|
||||||
points = [
|
points = [
|
||||||
[0,0],
|
[0,0],
|
||||||
[0, $switchDistance * $rows],
|
[0, $switchDistance * $rows],
|
||||||
@@ -121,7 +158,6 @@ module case(){
|
|||||||
[$switchDistance * 2, 0 + $fingerStep],
|
[$switchDistance * 2, 0 + $fingerStep],
|
||||||
[$switchDistance * 2, 0],
|
[$switchDistance * 2, 0],
|
||||||
];
|
];
|
||||||
difference(){
|
|
||||||
union() {
|
union() {
|
||||||
linear_extrude($shellHeight){
|
linear_extrude($shellHeight){
|
||||||
difference(){
|
difference(){
|
||||||
@@ -129,41 +165,18 @@ union() {
|
|||||||
offset(r=$clearance) polygon(points);
|
offset(r=$clearance) polygon(points);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
translate([0,0,-3]){
|
translate([0,0,-3])
|
||||||
linear_extrude(3){
|
linear_extrude(3){
|
||||||
offset(r=$shellWidth/2 + $clearance, chamfer=true) polygon(points);
|
offset(r=$shellWidth/2 + $clearance, chamfer=true) polygon(points);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rotate([90,0,0]) {
|
|
||||||
translate([0,0,-500]){
|
|
||||||
linear_extrude(99999){
|
|
||||||
polygon(
|
|
||||||
[
|
|
||||||
[0 - $shellWidth/2, -3],
|
|
||||||
[$switchDistance * 6 + $switchDistance/2,0],
|
|
||||||
[$switchDistance * 6 + $shellWidth/2, -3]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// usb
|
|
||||||
translate([10, $switchDistance * 5, -2]){
|
|
||||||
union() {
|
|
||||||
cube([10,$shellWidth,5]);
|
|
||||||
translate([-5,-$shellWidth + $clearance - 40,0])
|
|
||||||
cube([20,$shellWidth + 40,5]);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user