-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDesiccant Slit Box.scad
54 lines (45 loc) · 1.46 KB
/
Desiccant Slit Box.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
base_size = 70;
base_height = 80;
thickness = 4;
slit_count = 18;
slit_width = 1.75;
support_count = 5;
// Gap Calculations
usable_space = base_size - (thickness * 2);
slit_space = slit_count * slit_width;
slit_spacing = (usable_space - slit_space) / (slit_count - 1);
usable_height = base_height - (thickness * 2) + (slit_width * 2);
support_space = (support_count + 2) * slit_width;
support_spacing = (usable_height - support_space) / (support_count + 1);
module wall() {
difference () {
cube([thickness, base_size, base_height]);
translate([-1, 0, thickness]) {
for (y_pos = [
thickness :
slit_width + slit_spacing :
base_size - thickness
]) {
translate([0, y_pos, 0])
cube([thickness + 2, slit_width, base_height - (thickness * 2)]);
}
}
}
translate([0, thickness, 0]) {
for (z_pos = [
thickness + support_spacing :
slit_width + support_spacing :
base_height - thickness - support_spacing
]) {
translate([0, 0, z_pos])
cube([thickness, base_size - (thickness * 2), slit_width]);
}
}
}
// Base
cube([base_size, base_size, thickness]);
// Walls
wall();
translate([0, thickness, 0]) rotate([0, 0, -90]) wall();
translate([0, base_size, 0]) rotate([0, 0, -90]) wall();
translate([base_size - thickness, 0, 0]) wall();