Added top part of box

This commit is contained in:
nedko 2023-03-08 10:52:45 +02:00
parent c25e6f5f44
commit 73b26ab188
2 changed files with 71 additions and 0 deletions

71
openscad/top.scad Normal file
View File

@ -0,0 +1,71 @@
size_wall = 1.5;
size_x = 105;
size_y = 50;
size_z = 12;
hole_dist_x = 35;
hole_dist_y = 20.5;
hole_rad = 4 / 2;
display_x = 60;
display_y = 25;
display_z = 3;
btn_size = 8;
btn_dist_x = 45;
btn_dist_y = 20;
union()
{
difference()
{
// Main block
cube([size_x + size_wall * 2 + 1, size_y + size_wall * 2 + 1, size_z + size_wall], center = true);
// Hollow
translate([0, 0, size_wall])
{
cube([size_x + 1, size_y + 1, size_z + size_wall], center = true);
}
// Display Cut
cube([display_x, display_y, size_z + size_wall + 1], center = true);
// Buttons
for (x = [-1:2:1])
{
translate([x * btn_dist_x, btn_dist_y, 0])
{
cube([btn_size, btn_size, size_z + size_wall + 1], center = true);
}
}
}
// Mounts
for (x = [-1:2:1])
{
for (y = [-1:2:1])
{
translate([x * hole_dist_x, y * hole_dist_y, 0])
{
difference()
{
cylinder(size_z + size_wall, hole_rad + size_wall, hole_rad + size_wall, $fn = 60, center = true);
cylinder(size_z + size_wall + 1, hole_rad, hole_rad, $fn = 60, center = true);
}
}
}
}
// Display Outline
translate([0, 0, (display_z + size_wall) / 2 - (size_z + size_wall) / 2])
{
difference()
{
cube([display_x + 2 * size_wall, display_y + 2 * size_wall, display_z + size_wall], center = true);
cube([display_x, display_y, display_z + size_wall + 1], center = true);
}
}
}

BIN
stl/top.stl Normal file

Binary file not shown.