format&heroes

cleanup the formaat and make heroes box
This commit is contained in:
2026-04-29 15:45:31 +02:00
parent 6c4deab335
commit bd6ea68d9a
9 changed files with 263 additions and 348 deletions

View File

@@ -1,66 +1,11 @@
include <BOSL2/std.scad>
use <../Box-Lid.scad>
// Parameter for console overwrite
b = 178;
t = 38;
h = 20;
module box(b, t) {
bInner = b - 10;
tInner = t - 10;
difference() {
union () {
if (bInner >= 6 && tInner >= 6) {
difference() {
cube([ b, t, 1.5 ], false);
bSpace = 5 + (((bInner + 2) % 8) / 2);
bAmount = (((bInner + 2) - bSpace + 5) / 8);
tSpace = 5 + (((tInner + 2) % 8) / 2);
tAmount = (((tInner + 2) - tSpace + 5) / 8);
for (i = [0:bAmount - 1], j = [0:tAmount - 1]) {
translate([ bSpace + i * 8, tSpace + j * 8, -1 ]) {
cube([ 6, 6, 3.5 ], false);
}
}
}
} else {
cube([ b, t, 1.5 ], false);
}
sideCut(b,t);
translate([b, 0, 0]) {
mirror([1, 0, 0]) {
sideCut(b,t);
}
}
// frame area around card pocket
translate([b-83, t - 16, 0]) {
cube([83, 16, 1.5], false);
difference() {
union() {
lid(178, 38);
translate([92.95, 21.2, 0]) cube([85.1, 16.8, 2], false); // frame area around card pocket
}
translate([96.75, 26, -1]) cube([81.4, 13, 41], false); // clean area for card pocket
}
// clean area for card pocket
translate([b-79, t - 12, -1]) {
cube([80, 13, 41], false);
}
}
}
module sideCut(b,t) {
difference() {
translate([0,0,1.5]) {
cube([3, 0.75 * t - 2.5,6.6], false);
}
translate([2.3,t/4+2,0]) {
rotate([-90,-90,0]) {
linear_extrude(0.5 * t) {
polygon(points=[[-1,-1], [-1,1], [7, 1], [5.1,-1]]);
}
}
}
}
translate([0,0,1.5]) {
cube([1.4, t, 3.4], false);
}
}
box(b, t);