forked from eltoozero/lol-gbz_3dparts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlol-speakerretainer.scad
167 lines (136 loc) · 3.16 KB
/
lol-speakerretainer.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
//lol speaker retainer
// the 8ohm speaker included with the Circuit Sword has an offset.
$fn=64;
spkinsidedia=29;
spkinsidez=5.6;
ridgeheight=spkinsidez-4.14;
//shallowend=3.4;
shallowend=6.49/2;
speakerdia=28.25;
contactwidth=6;
oz=4;
pegd=4.6;
opegd=7.6;
id=29.05;
od=32;
iz=4;
mz=8.2;
sd=28.5;
sz=6;
final_part();
//intersection(){
// cube(od);
//final_part();
//}
module final_part(){
difference() {
main_body();
//bottom cup
difference() {
cylinder(d=od, h=iz);
cylinder(d=id, h=iz);
}
//speaker slug
speaker_slug();
//peg
translate([id/2+pegd/2,0,0])
cylinder(d=pegd, h=mz);
//outer peg
translate([id/2+pegd/2,0,mz-(mz-sz)])
#cylinder(d=opegd, h=mz-sz);
//inner cut
//cylinder(d=sd-4, h=mz);
translate([0,0,2])
rotate([90,0,135])
#cylinder(h=od, d=4);
}
}
// main block
module main_body() {
cylinder(d=od, h=mz);
}
module speaker_slug() {
cylinder(d=id, h=sz-4);
translate([0,0,sz-6])
#cylinder(d1=id, d2=sd-6, h=6);
}
// ugh lets try again
//// cap end
//translate([0,0,-oz+.6])
//color("green") cylinder(d=od, h=oz);
////translate([0,0,.6])
//difference(){
//translate([0,0,.6])
////#color("green") cylinder(d=od, h=3);
//color("purple") cylinder(d1=id-4, d2=id, h=2.4);
//translate([0,0,3])
//#color("purple") cylinder(d=id, h=4);
// translate([0,0,.6])
// difference() {
// cylinder(d=od, h=4);
// cylinder(d=id, h=4);
// }
//}
// starting all over, all this crap below is dumb
//cylinder(d=spkinsidedia, h=spkinsidez-ridgeheight);
//
//translate([0,0,-ridgeheight])
//cylinder(d=spkinsidedia-4, h=spkinsidez);
//linear_extrude(height=.6)
//arc(21/2, 4, 300);
//difference(){
// translate([0,0,-4])
// cylinder(h=4, d=spkinsidedia);
// translate([0,0,-4])
//
// #cylinder(h=4, d1=speakerdia-3, d2=speakerdia);
//}
//
//translate([0,0,-4])
//cylinder(d=spkinsidedia, h=.6);
//
//difference() {
// //outside rim
// cylinder(d=spkinsidedia, h=shallowend);
//
// //inside shape
// cylinder(d=speakerdia, h=shallowend);
//
// translate([-contactwidth/2,0,0])
//// #cube([contactwidth, spkinsidedia, shallowend]);
//hull() {
//translate([-contactwidth,0,shallowend])
//cube([contactwidth*2, spkinsidedia,0.2]);
//translate([-contactwidth/4,0,])
//cube([contactwidth/2, spkinsidedia,0.2]);
//
//}
//
//}
//
//module arc(radius, thick, angle){
// intersection(){
// union(){
// rights = floor(angle/90);
// remain = angle-rights*90;
// if(angle > 90){
// for(i = [0:rights-1]){
// rotate(i*90-(rights-1)*90/2){
// polygon([[0, 0], [radius+thick, (radius+thick)*tan(90/2)], [radius+thick, -(radius+thick)*tan(90/2)]]);
// }
// }
// rotate(-(rights)*90/2)
// polygon([[0, 0], [radius+thick, 0], [radius+thick, -(radius+thick)*tan(remain/2)]]);
// rotate((rights)*90/2)
// polygon([[0, 0], [radius+thick, (radius+thick)*tan(remain/2)], [radius+thick, 0]]);
// }else{
// polygon([[0, 0], [radius+thick, (radius+thick)*tan(angle/2)], [radius+thick, -(radius+thick)*tan(angle/2)]]);
// }
// }
// difference(){
// circle(radius+thick);
// circle(radius);
// }
// }
//}
//