-
Notifications
You must be signed in to change notification settings - Fork 0
/
box.scad
95 lines (81 loc) · 1.74 KB
/
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
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
88
89
90
91
92
93
94
95
include <global.scad>;
use <screw_extension.scad>;
module box_with_window()
{
difference()
{
// begin with a block
cube([
box_x,
box_y,
box_z
]);
// remove the inside of the block
translate([
material_width,
material_width,
material_width
])
cube([
box_x - 2*material_width,
box_y - 2*material_width,
box_z - 2*material_width
]);
// make a window for the dislay
translate([
(box_x - display_x) / 2,
(box_y - display_y) / 2,
box_z-material_width
])
cube([
display_x,
display_y,
material_width
]);
}
}
module box()
{
difference()
{
union()
{
box_with_window();
// add screw hole extensions
screw_extension();
translate([
box_x,
0
])
screw_extension();
translate([
box_x,
box_y
])
screw_extension();
translate([
0,
box_y
])
screw_extension();
}
// drill holes in the screw extensions
screw_hole();
translate([
box_x,
0
])
screw_hole();
translate([
box_x,
box_y
])
screw_hole();
translate([
0,
box_y
])
screw_hole();
}
}
box();