-
Notifications
You must be signed in to change notification settings - Fork 0
/
mirror.scad
36 lines (27 loc) · 824 Bytes
/
mirror.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
module mirror_x(do_it = true) {
mirror([(do_it ? 1 : 0), 0, 0]) children();
}
module mirror_y(do_it = true) {
mirror([0, (do_it ? 1 : 0), 0]) children();
}
module mirror_z(do_it = true) {
mirror([0, 0, (do_it ? 1 : 0)]) children();
}
module mirror_xy(do_it = true) {
mirror([(do_it ? 1 : 0), 0, 0]) mirror([0, (do_it ? 1 : 0), 0]) children();
}
module mirror_copy_x() {
for (mx = [0, 1]) mirror([mx, 0, 0]) children();
}
module mirror_copy_y() {
for (my = [0, 1]) mirror([0, my, 0]) children();
}
module mirror_copy_z() {
for (mz = [0, 1]) mirror([0, 0, mz]) children();
}
module mirror_copy_xy() {
for (mx = [0, 1]) mirror([mx, 0, 0]) for (my = [0, 1]) mirror([0, my, 0]) children();
}
module mirror_copy_center_xy() {
for (m = [0, 1]) mirror([m, 0, 0]) mirror([0, m, 0]) children();
}