-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
module_empty.scad
50 lines (39 loc) · 1.26 KB
/
module_empty.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
// Creates an empty module
/* [Case Dimensions] */
// diameter of the base
base_diameter = 62.8; //[62.8:Small, 80:Medium, 100:Large, 130:XLarge]
// thickness of outer wall
wall_thickness = 2; //[2:0.5:5]
// height of the module
module_height = 20; //[10:5:100]
// enable rim
enable_rim = true;
// rim height
rim_height = 1.2; // [.5: .1: 2]
/* [Hidden] */
$fn = 128;
base_radius = base_diameter / 2;
use <common.scad>
module empty(base_radius, empty_height, wall_thickness, enable_rim) {
difference() {
union() {
// outer shell
shell(base_radius*2, empty_height, wall_thickness, false);
// male connectors (to module below)
connectors_male(90, base_radius, wall_thickness);
connectors_male(270, base_radius, wall_thickness);
// female connectors (to module above)
connectors_female(90, base_radius, empty_height, wall_thickness);
connectors_female(270, base_radius, empty_height, wall_thickness);
if (enable_rim) {
rim(base_radius, empty_height, wall_thickness, rim_height);
}
}
// spacer for rim of module below
if (enable_rim) {
// make spacer 25% taller and 20% wider than the rim itself
rim(base_radius, 0, wall_thickness - 0.2, rim_height * 1.25, 1.2);
}
}
}
empty(base_radius, module_height, wall_thickness, enable_rim);