-
Notifications
You must be signed in to change notification settings - Fork 19
/
SA Combined.scad
169 lines (150 loc) · 6.33 KB
/
SA Combined.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
// SA All Rows
module black_text(s, size) {color("Black") text(s, size); }
module white_text(s, size) {color("White") text(s, size); }
module text_label(a) { translate([a[0] * 22, (a[1] * 19) + 2, 0]) { white_text(str(a[1],"u"), 4); }}
module sa_r1 (res) {
difference() {
intersection() {
translate([-27.93, 16, 0]) rotate([90,0,0]) cylinder(h = 33,r = 43.945, $fn = res);
translate([-16, 35.83, 0]) rotate([90,0,90]) cylinder(h = 33,r = 43.945, $fn = res);
translate([31, -16, 0]) rotate([90,0,180]) cylinder(h = 33,r = 33, $fn = res);
translate([16, -35.83, 0]) rotate([90,0,270]) cylinder(h = 33,r = 43.945, $fn = res);
}
translate([0,0,46]) sphere(r = 33, $fn = res);
translate([-33,-33,-66]) cube(66);
}
}
module sa_r1_slice () { intersection() { sa_r1(100); translate([-33,1,0]) cube([66,1,66]); }}
module sa_r1_right_end() { difference() { sa_r1(100); translate([-33,0,0]) cube(66); }}
module sa_r1_left_end() { difference() { sa_r1(100); translate([-33,-66,0]) cube(66); }}
module sa_r2 (res) {
difference() {
intersection() {
translate([-20, 16, 0]) rotate([90,0,0]) cylinder(h = 33,r = 33, $fn = res);
translate([-16, 24, 0]) rotate([90,0,90]) cylinder(h = 33,r = 33, $fn = res);
translate([29, -16, 0]) rotate([90,0,180]) cylinder(h = 33,r = 33, $fn = res);
translate([16, -24, 0]) rotate([90,0,270]) cylinder(h = 33,r = 33, $fn = res);
}
translate([0,0,46]) sphere(r = 33, $fn = res);
translate([-33,-33,-65]) cube(66);
}
}
module sa_r2_slice () { intersection() { sa_r2(100); translate([-33,1,0]) cube([66,1,66]); }}
module sa_r2_right_end() { difference() { sa_r2(100); translate([-33,0,0]) cube(66); }}
module sa_r2_left_end() { difference() { sa_r2(100); translate([-33,-66,0]) cube(66); }}
module sa_r3 (res) {
difference() {
intersection() {
translate([24, 16, 0]) rotate([90,0,0]) cylinder(h = 33,r = 33, $fn = res);
translate([-16, 24, 0]) rotate([90,0,90]) cylinder(h = 33,r = 33, $fn = res);
translate([-24, -16, 0]) rotate([90,0,180]) cylinder(h = 33,r = 33, $fn = res);
translate([16, -24, 0]) rotate([90,0,270]) cylinder(h = 33,r = 33, $fn = res);
}
translate([0,0,46]) sphere(r = 33, $fn = res);
translate([-33,-33,-64]) cube(66);
}
}
module sa_r3_slice () { intersection() { sa_r3(100); translate([-33,1,0]) cube([66,1,66]); }}
module sa_r3_right_end() { difference() { sa_r3(100); translate([-33,0,0]) cube(66); }}
module sa_r3_left_end() { difference() { sa_r3(100); translate([-33,-66,0]) cube(66); }}
module sa_r4 (res) {
difference() {
intersection() {
translate([20, 16, 0]) rotate([90,0,0]) cylinder(h = 33,r = 33, $fn = res);
translate([-16, 24, 0]) rotate([90,0,90]) cylinder(h = 33,r = 33, $fn = res);
translate([-29, -16, 0]) rotate([90,0,180]) cylinder(h = 33,r = 33, $fn = res);
translate([16, -24, 0]) rotate([90,0,270]) cylinder(h = 33,r = 33, $fn = res);
}
translate([0,0,46]) sphere(r = 33, $fn = res);
translate([-33,-33,-65]) cube(66);
}
}
module sa_r4_slice () { intersection() { sa_r4(100); translate([-33,1,0]) cube([66,1,66]); }}
module sa_r4_right_end() { difference() { sa_r4(100); translate([-33,0,0]) cube(66); }}
module sa_r4_left_end() { difference() { sa_r4(100); translate([-33,-66,0]) cube(66); }}
module sa_r3_bump (res) {
difference() {
intersection() {
translate([24, 16, 0]) rotate([90,0,0]) cylinder(h = 33,r = 33, $fn = res);
translate([-16, 24, 0]) rotate([90,0,90]) cylinder(h = 33,r = 33, $fn = res);
translate([-24, -16, 0]) rotate([90,0,180]) cylinder(h = 33,r = 33, $fn = res);
translate([16, -24, 0]) rotate([90,0,270]) cylinder(h = 33,r = 33, $fn = res);
translate([0,0,-19]) sphere(r = 33, $fn = res);
}
translate([-33,-33,-64]) cube(66);
}
}
module sa_r3_bump_slice () {intersection() {sa_r3_bump(100); translate([-33,1,0]) cube([66,1,66]);}}
module sa_r3_bump_right_end() {difference() {sa_r3_bump(100); translate([-33,0,0]) cube(66);}}
module sa_r3_bump_left_end() {difference() {sa_r3_bump(100); translate([-33,-66,0]) cube(66);}}
sizes = [
[1, 1, 1, 1],
[2, 1.25, 4, 5],
[3, 1.5 , 0, 9],
[4, 1.75, -5, 14],
[5, 2.0 , -10, 19],
[6, 2.25, -15, 24],
[7, 2.5 , -19, 28],
[8, 2.75, -23, 32],
[9, 6.25, -86, 95],
];
// R1
translate([50,390,10])
for(a = sizes) {
// text_label(a);
translate([a[0] * 22, 0, 0]) {
union(){
translate([9, 9, 0]) sa_r1_right_end();
if(a[0] > 1) translate([9, a[2], 0]) scale([1, a[3],1]) sa_r1_slice();
translate([9, 9 + (a[1] - 1) * 18, 0]) sa_r1_left_end();
}
}
}
// R2
translate([50,260,10])
for(a = sizes) {
// text_label(a);
translate([a[0] * 22, 0, 0]) {
union(){
translate([9, 9, 0]) sa_r2_right_end();
if(a[0] > 1) translate([9, a[2], 0]) scale([1, a[3],1]) sa_r2_slice();
translate([9, 9 + (a[1] - 1) * 18, 0]) sa_r2_left_end();
}
}
}
// R3
translate([50,130,10])
for(a = sizes) {
// text_label(a);
translate([a[0] * 22, 0, 0]) {
union(){
translate([9, 9, 0]) sa_r3_right_end();
if(a[0] > 1) translate([9, a[2], 0]) scale([1, a[3],1]) sa_r3_slice();
translate([9, 9 + (a[1] - 1) * 18, 0]) sa_r3_left_end();
}
}
}
// R4
translate([50,0,10])
for(a = sizes) {
// text_label(a);
translate([a[0] * 22, 0, 0]) {
union(){
translate([9, 9, 0]) sa_r4_right_end();
if(a[0] > 1) translate([9, a[2], 0]) scale([1, a[3],1]) sa_r4_slice();
translate([9, 9 + (a[1] - 1) * 18, 0]) sa_r4_left_end();
}
}
}
// R3 bump
translate([50,-130,10])
for(a = sizes) {
// text_label(a);
translate([a[0] * 22, 0, 0]) {
union(){
translate([9, 9, 0]) sa_r3_bump_right_end();
if(a[0] > 1) translate([9, a[2], 0]) scale([1, a[3],1]) sa_r3_bump_slice();
translate([9, 9 + (a[1] - 1) * 18, 0]) sa_r3_bump_left_end();
}
}
}