cleanup box

This commit is contained in:
2026-04-23 21:49:30 +02:00
parent 9db0473369
commit 6c4deab335
2 changed files with 46 additions and 26 deletions

View File

@@ -1,35 +1,47 @@
include <BOSL2/std.scad>
// Parameter for console overwrite
b = 79.8;
t = 68.5;
h = 22.5;
b = 30.0;
t = 30.0;
h = 30.0;
module box(b, t, h) {
difference() {
// base
cuboid([ b, t, h], anchor = [ -1, -1, -1 ],rounding = 1,edges = [ TOP, FRONT + LEFT, FRONT + RIGHT, BACK + LEFT, BACK + RIGHT ]);
cuboid(
[ b, t, h],
anchor = [ -1, -1, -1 ],
rounding = 1,
edges = [ TOP, FRONT + LEFT, FRONT + RIGHT, BACK + LEFT, BACK + RIGHT ]
);
// inner
translate([ 5, 1.5, 1.5 ]) {
cuboid([ b - 10, t - 3, h - 0.5 ], anchor = [ -1, -1, -1 ],
rounding = 8, edges = [ BOTTOM + FRONT, BOTTOM + LEFT, BOTTOM + BACK, BOTTOM + RIGHT, FRONT + LEFT, FRONT + RIGHT, BACK + LEFT, BACK + RIGHT ]);
cuboid(
[ b - 10, t - 3, h - 0.5 ],
anchor = [ -1, -1, -1 ],
rounding = 8,
edges = [ BOTTOM + FRONT, BOTTOM + LEFT, BOTTOM + BACK, BOTTOM + RIGHT, FRONT + LEFT, FRONT + RIGHT, BACK + LEFT, BACK + RIGHT ]
);
}
// left lower
sideCut(b,t);
// left upper
translate([0, 0, h]) {
mirror([0, 0, 1]) {
sideCut(b, t);
}
}
// right lower
translate([b, 0, 0]) {
mirror([1, 0, 0]) {
sideCut(b,t);
}
}
// right upper
translate([b, 0, h]) {
mirror([1, 0, 0]) {
@@ -45,26 +57,28 @@ module sideCut(b,t) {
translate([0,-1,0]) {
rotate([-90,-90,0]) {
linear_extrude(t/4+4) {
polygon(points=[[-1,-1], [-1,1.6], [3.1, 1.6], [6.1,-1]]);
polygon(points=[[-1,-1], [-1,1.85], [3.35, 1.85], [6.35,-1]]);
}
}
}
difference() {
translate([0,t/4+2,0]) {
rotate([-90,-90,0]) {
linear_extrude(0.75 * t) {
polygon(points=[[-1,-1], [-1,3.2], [6.9, 3.2], [11.2,-1]]);
polygon(points=[[-1,-1], [-1,3.45], [7.15, 3.45], [11.45,-1]]);
}
}
}
translate([2.2,0.75 * t - 2.4, 0]) {
translate([2.45,0.75 * t - 2.4, 0]) {
rotate([90,-90,0]) {
linear_extrude(0.4 * t + 5) {
polygon(points=[[-1,-1], [-1,0.6], [3.3, 0.6], [4.9,-1]]);
polygon(points=[[-1,-1], [-1,0.35], [3.05, 0.35], [4.65,-1]]);
}
}
}
}
}
box(b + 5, t + 3, h + 4);
box(b, t, h - 2);