2024-03-20 13:35:11 -06:00
|
|
|
include <PiZero.scad>
|
|
|
|
include <BOSL2/std.scad>
|
2024-03-20 17:11:02 -06:00
|
|
|
include <BOSL2/walls.scad>
|
2024-03-20 13:35:11 -06:00
|
|
|
|
2024-03-20 14:35:37 -06:00
|
|
|
CaseSizeX = PiSizeX + 1.5;
|
|
|
|
CaseSizeY = PiSizeY + 1.5;
|
2024-03-20 17:11:02 -06:00
|
|
|
wall_thickness = 3;
|
2024-03-20 13:35:11 -06:00
|
|
|
cap_thickness = 6;
|
|
|
|
case_height = 7;
|
2024-03-20 17:11:02 -06:00
|
|
|
outer_rect_size=[CaseSizeX + wall_thickness, CaseSizeY + wall_thickness];
|
2024-03-20 13:35:11 -06:00
|
|
|
PiZeroVer = "WH";
|
2024-03-20 17:11:02 -06:00
|
|
|
module case() {
|
|
|
|
%up(cap_thickness) PiZeroBody(false);
|
|
|
|
union() {
|
|
|
|
// Case Walls
|
|
|
|
up(cap_thickness - 0.05) difference() {
|
|
|
|
rect_tube(h=case_height, size=outer_rect_size , isize=[CaseSizeX, CaseSizeY], anchor=BOTTOM);
|
|
|
|
up(0.5) PiZeroBody(true);
|
|
|
|
up(2) fwd(CaseSizeY / 2 + wall_thickness / 2 - 0.29) right(CaseSizeX / 2 - 6) xrot(90) text3d(text = "5V", size=3, font = "Hurmit Nerd Font", thickness = 0.3, anchor=FRONT+LEFT+BOTTOM);
|
|
|
|
up(case_height - 0.1) topCap();
|
|
|
|
}
|
|
|
|
// Bottom Wall Cap
|
|
|
|
linear_extrude(cap_thickness) rect(size = outer_rect_size, anchor = CENTER, spin = 0);
|
|
|
|
// Top Wall Cap
|
|
|
|
|
2024-03-20 13:35:11 -06:00
|
|
|
}
|
|
|
|
}
|
2024-03-20 17:11:02 -06:00
|
|
|
|
|
|
|
module topCap() {
|
|
|
|
linear_extrude(cap_thickness) rect(size = outer_rect_size, anchor = CENTER, spin = 0);
|
|
|
|
down(2) rect_tube(h=2, size=[CaseSizeX - 0.5, CaseSizeY - 0.5], isize=[CaseSizeX - wall_thickness, CaseSizeY - wall_thickness], anchor=BOTTOM);
|
|
|
|
right((CaseSizeX - 0.5) / 2) down(2) yrot(90) narrowing_strut(w=1, l=CaseSizeY - (wall_thickness * 2), wall=0.1, ang=60, anchor=BOTTOM+RIGHT);
|
|
|
|
left((CaseSizeX - 0.5) / 2) down(2) yrot(-90) narrowing_strut(w=1, l=CaseSizeY - (wall_thickness * 2), wall=0.1, ang=60, anchor=BOTTOM+LEFT);
|
|
|
|
}
|
|
|
|
|
|
|
|
!case();
|
|
|
|
up(cap_thickness) yrot(180) topCap();
|