-
Notifications
You must be signed in to change notification settings - Fork 0
/
parts.scad
72 lines (60 loc) · 1.36 KB
/
parts.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
include <config.scad>;
use <side-xz.scad>;
use <side-xy.scad>;
use <side-yz.scad>;
spacing = 2;
module side_xz_planar(cut1, cut2)
{
rotate([-90, 0, 0])
side_xz(cut1, cut2);
}
module side_yz_planar()
{
rotate([-90, 270, 0])
side_yz();
}
module parts()
{
// Align the higher stack to the left side, so we can read the required material height
side_pieces_height = 4*box_z + 3*spacing;
top_bottom_pieces_height = 2*box_y + spacing;
side_pieces_x = (side_pieces_height > top_bottom_pieces_height) ? 0 : (box_x + spacing);
top_bottom_pieces_x = (side_pieces_height > top_bottom_pieces_height) ? (box_x + spacing) : 0;
translate([
side_pieces_x,
0,
0
])
side_xz_planar();
translate([
side_pieces_x + snap_joint_feather_hook_height + material_z,
box_z + spacing,
0
])
side_yz_planar();
translate([
side_pieces_x,
2*(box_z + spacing),
0
])
side_xz_planar();
translate([
side_pieces_x + snap_joint_feather_hook_height + material_z,
3*(box_z + spacing),
0
])
side_yz_planar();
translate([
top_bottom_pieces_x,
0,
0
])
side_xy();
translate([
top_bottom_pieces_x,
box_y + spacing,
0
])
side_xy();
}
parts();