-
Notifications
You must be signed in to change notification settings - Fork 1
/
CryptoFaxPA.scad
87 lines (73 loc) · 2.22 KB
/
CryptoFaxPA.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/* CryptoFaxPA
License: AGPLv3 */
SIZE = [90, 123, 90];
ANGLE_RADIUS = 15;
BOTTOM_THICKNESS = 2;
LID_THICKNESS = 2;
WALL_THICKNESS = 3;
SHELF_DEPTH = 3;
BUTTONS_DIAMETER = 12;
box();
translate([SIZE[0] + 15, 0, 0])
lid();
module lid() {
difference() {
// main plate
linear_extrude(height = LID_THICKNESS)
offset(r = -WALL_THICKNESS)
rounded_square(SIZE, ANGLE_RADIUS);
// button holes
for (o = [[33,19,-0.1],[57,19,-0.1]])
translate(o)
cylinder(d = BUTTONS_DIAMETER, h = LID_THICKNESS+0.2);
// printer hole
translate([8.4,36.3,-0.1])
linear_extrude(height = LID_THICKNESS+0.2)
rounded_square([74,74], 5);
};
// top of the rear opening
translate([ANGLE_RADIUS, SIZE[1]-WALL_THICKNESS-0.1, 0])
cube([SIZE[0] - ANGLE_RADIUS*2, WALL_THICKNESS+0.1, BOTTOM_THICKNESS]);
}
module box() {
difference() {
// external shape
linear_extrude(height = SIZE[2])
rounded_square(SIZE, ANGLE_RADIUS);
// internal void
translate([0,0,BOTTOM_THICKNESS])
linear_extrude(height = SIZE[2])
offset(r = -WALL_THICKNESS)
rounded_square(SIZE, ANGLE_RADIUS);
// rear window
translate([15,SIZE[1]-WALL_THICKNESS-0.1,BOTTOM_THICKNESS])
cube([SIZE[0] - ANGLE_RADIUS*2, 10, SIZE[2]]);
// USB port hole
translate([SIZE[0]-WALL_THICKNESS-0.1, 17, 9.3])
cube([WALL_THICKNESS+0.2, 16, 9]);
// Raspberry PI mounting holes
for (o = [[0,0], [49,0], [49,58], [0,58]])
translate(o)
translate([19,18,-0.1])
cylinder(d = 3, h = BOTTOM_THICKNESS+0.2);
};
// lid shelves
translate([WALL_THICKNESS, ANGLE_RADIUS, SIZE[2]-LID_THICKNESS])
lid_mount(SHELF_DEPTH, SIZE[1] - ANGLE_RADIUS*2);
translate([SIZE[0]-WALL_THICKNESS, SIZE[1] - ANGLE_RADIUS, SIZE[2]-LID_THICKNESS])
rotate(180)
lid_mount(SHELF_DEPTH, SIZE[1] - ANGLE_RADIUS*2);
}
module rounded_square(s, r) {
translate([r,r])
minkowski() {
square([s[0] - 2*r, s[1] - 2*r]);
circle(r);
}
}
module lid_mount(d, l) {
translate([0,l,-d])
rotate([90,0,0])
linear_extrude(height = l)
polygon(points = [[0,d], [d,d], [0,0]]);
}