-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlickport-holder.scad
339 lines (279 loc) · 9.6 KB
/
lickport-holder.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
// Ariel Burman
// Instituto de Ingeniería Biomédica
// Universidad de Buenos Aires
/************************************************************************************/
A1 = 20 ; // Ancho regulacion lateral
B1 = 20 ; // Separacion base
C1 = 10 ; // Separacion punta
D1 = 20; // Alto
E1 = 5; // Ancho
F1 = 2 ; // radio interno ranura regulacion
G1 = 20 ; // Largo punta
H1 = 6 ; // Radio externo boca
I1 = 2 ; // Radio menor
J1 = 2.6 ; // Radio mayor
K1 = 10 ; // alto boca
d1 = D1 - .6 ;
e1 = E1 - .6 ;
a1 = A1 + B1 + C1 ;
b1 = a1 + G1 ;
c1 = d1 - H1 ;
fn1 = 50 ;
ex = 0.1 ;
r_boq=22;
l_boq=45;
z_boq=9;
module boquilla(){
difference() {
union(){
cube([b1,e1,d1]);
translate([b1,e1-K1/2,d1])rotate([90,0,0])cylinder(h=K1,r=H1,center=true,$fn=fn1);
}
polyhedron(
points = [ [a1,-ex,0] , [a1,e1+ex,0] , [b1,-ex,c1] , [b1,e1+ex,c1], [b1+ex,-ex,-ex] , [b1+ex,e1+ex,-ex] ],
faces = [ [0,2,4] , [1,5,3] , [0,1,2] ,[1,3,2],
[2,3,4] , [3,5,4] , [0,4,1],[1,4,5]]
);
translate([A1/2+B1,e1/2,d1/2])cube([A1,e1+2*ex,F1*2],center=true);
translate([B1,e1/2,d1/2])rotate([90,0,0])cylinder(h=e1+2*ex,r=F1,center=true,$fn=fn1);
translate([B1+A1,e1/2,d1/2])rotate([90,0,0])cylinder(h=e1+2*ex,r=F1,center=true,$fn=fn1);
translate([b1,e1-K1/2,d1])rotate([90,0,0])cylinder(h=K1+ex,r1=J1,r2=I1,center=true,$fn=fn1);
}
// agregado para que la rata no pueda agarrar el pico
echo("Largo base = ",a1);
echo("Largo boquilla = ",b1);
translate([b1,E1-K1/2,d1+z_boq])
difference(){
translate([0,e1,0])rotate([90,0,0])cylinder(h=l_boq,r1=r_boq,r2=r_boq-4,$fn=fn1);
rotate([90,0,0])cylinder(h=l_boq,r=r_boq-8,$fn=fn1);
translate([-r_boq-5,-l_boq,-z_boq])cube([2*r_boq+10,l_boq+10,r_boq*2+10]);
translate([0,(e1-E1),-z_boq])rotate([90,0,0])cylinder(h=K1+ex,r1=J1,r2=I1,center=true,$fn=fn1);
}
}
/************************************************************************************/
A2 = A1 ;
B2 = B1 ;
C2 = 3 ; //espesor receptor
D2 = D1 ;
E2 = E1 ;
F2 = F1 ;
G2 = 50 ;
H2 = 8 ; //excedente bordes pared
I2 = 5 ; //espesor pared
J2 = C1 ;
a2 = G2 + 2 * H2;
b2 = D2 + 2 * C2;
c2 = A2 + B2 + J2 ;
d2 = E2 + 2*C2;
e2 = E2/2 + C2;
alpha = 18 ;
beta = 35 ;
module ranura_circ(){
union(){
intersection() {
union(){
polyhedron(
points = [ [-I2,0,0] , [I2,0,0] ,
[-I2,G2/2+H2,(G2/2+H2)*tan(alpha)] , [I2,G2/2+H2,(G2/2+H2)*tan(alpha)],
[-I2,G2/2+H2,-(G2/2+H2)*tan(alpha)] , [I2,G2/2+H2,-(G2/2+H2)*tan(alpha)]
],
faces = [ [0,2,1] , [1,2,3] , [2,4,3] ,[3,4,5],
[0,5,4] , [0,1,5] , [1,3,5],[0,4,2] ]
);
rotate([0,0,180]) polyhedron(
points = [ [-I2,0,0] , [I2,0,0] ,
[-I2,G2/2+H2,(G2/2+H2)*tan(alpha)] , [I2,G2/2+H2,(G2/2+H2)*tan(alpha)],
[-I2,G2/2+H2,-(G2/2+H2)*tan(alpha)] , [I2,G2/2+H2,-(G2/2+H2)*tan(alpha)]
],
faces = [ [0,2,1] , [1,2,3] , [2,4,3] ,[3,4,5],
[0,5,4] , [0,1,5] , [1,3,5],[0,4,2] ]
);
}
difference(){
rotate([0,90,0])cylinder(h=I2+ex,r=G2/2+F2,center=true,$fn=fn1);
rotate([0,90,0])cylinder(h=I2+2*ex,r=G2/2-F2,center=true,$fn=fn1);
}
}
rotate([alpha,0,0])translate([0,G2/2,0]) rotate([0,90,0])cylinder(h=I2+ex,r=F2,center=true,$fn=fn1);
rotate([-alpha,0,0])translate([0,G2/2,0]) rotate([0,90,0])cylinder(h=I2+ex,r=F2,center=true,$fn=fn1);
rotate([alpha,0,0])translate([0,-G2/2,0]) rotate([0,90,0])cylinder(h=I2+ex,r=F2,center=true,$fn=fn1);
rotate([-alpha,0,0])translate([0,-G2/2,0]) rotate([0,90,0])cylinder(h=I2+ex,r=F2,center=true,$fn=fn1);
}
}
module pared() {
intersection(){
union(){
intersection(){
rotate([0,90,0]) cylinder(h=I2,r=G2/2+H2,center=true,$fn=fn1);
union(){
polyhedron(
points = [ [-I2,0,0] , [I2,0,0] ,
[-I2,G2/2+H2+1,(G2/2+H2+1)*tan(beta)] , [I2,G2/2+H2+1,(G2/2+H2+1)*tan(beta)],
[-I2,G2/2+H2+1,-(G2/2+H2+1)*tan(beta)] , [I2,G2/2+H2+1,-(G2/2+H2+1)*tan(beta)]
],
faces = [ [0,2,1] , [1,2,3] , [2,4,3] ,[3,4,5],
[0,5,4] , [0,1,5] , [1,3,5],[0,4,2] ]
);
rotate([0,0,180]) polyhedron(
points = [ [-I2,0,0] , [I2,0,0] ,
[-I2,G2/2+H2+1,(G2/2+H2+1)*tan(beta)] , [I2,G2/2+H2+1,(G2/2+H2+1)*tan(beta)],
[-I2,G2/2+H2+1,-(G2/2+H2+1)*tan(beta)] , [I2,G2/2+H2+1,-(G2/2+H2+1)*tan(beta)]
],
faces = [ [0,2,1] , [1,2,3] , [2,4,3] ,[3,4,5],
[0,5,4] , [0,1,5] , [1,3,5],[0,4,2] ]
);
}
}
cube([I2,G2+2,b2],center=true);
}
cube([I2,2*G2,b2],center=true);
}
}
module receptor() {
union() {
translate([-I2/2,0,b2/2])
difference(){
pared();
ranura_circ();
}
translate([c2/2,0,b2/2])
difference() {
cube([c2,d2,b2],center=true);
cube([c2+0.2,E2,D2],center=true);
translate([-c2/2+A2+B2,0,0])rotate([90,0,0])cylinder(h=d2+ex,r=F2,center=true,$fn=fn1);
}
//rotate([0,0,180])
translate([0,e2,0])polyhedron(
points = [ [0,0,0] , [A2/2,0,0] , [0,A2/2,0] ,[0,0,b2] , [A2/2,0,b2] , [0,A2/2,b2] ],
faces = [ [0,1,2] , [3,5,4] , [0,3,1] ,[1,3,4],
[1,4,2] , [4,5,2] , [5,3,0],[0,2,5] ]
);
translate([0,-e2,0])rotate([0,0,-90]) polyhedron(
points = [ [0,0,0] , [A2/2,0,0] , [0,A2/2,0] ,[0,0,b2] , [A2/2,0,b2] , [0,A2/2,b2] ],
faces = [ [0,1,2] , [3,5,4] , [0,3,1] ,[1,3,4],
[1,4,2] , [4,5,2] , [5,3,0],[0,2,5] ]
);
}
}
/************************************************************************************/
A3 = 140; // largo de la pieza
B3 = 20 ; // alto en la punta
D3 = 60 ; // alto base
E3 = 7; // espesor
F3 = F1 ; // diametro agujeros
G3 = 20 ; // largo base
H3 = 70 ; // largo ranura vertical
I3 = 20 ; // ancho regulacion horizontal
J3 = G2 ; // separacion regulacion horizontal
K3 = H2 ; // separacion borde base
C3 = 22.7 /2 ; // radio externo camara
L3 = 16 / 2 ; // radio interno camara
M3 = 3 ; // espesor pared camara
N3 = 5 ; // excedente camara
O3 = 5 ; // borde inf camara
P3 = 0 ; // Desplazamiento lateral camara
a3 = J3 + I3 + 2 * K3 ;
b3 = A3 - a3/2 ;
c3 = C3 + M3 ;
p4x1 = K3;
p4y1 = D3 - K3;
p4x2 = p4x1 + 4;
p4y2 = p4y1 - 34;
module soporte() {
echo("centro = " , A3 - a3 /2);
difference(){
union(){
polyhedron(
points = [ [0,0,0] , [A3,0,0] , [A3,0,B3] , [b3,0,B3] , [G3,0,D3] , [0,0,D3] ,
[0,E3,0] , [A3,E3,0] , [A3,E3,B3] , [b3,E3,B3] , [G3,E3,D3] , [0,E3,D3]
],
faces = [ [0,2,1] , [0,3,2] , [0,4,3] ,[0,5,4],
[6,7,8] , [6,8,9] , [6,9,10] ,[6,10,11],
[0,11,5] , [0,6,11] , [5,11,4] ,[11,10,4] , [4,9,3] , [4,10,9] ,
[3,8,2], [3,9,8] , [2,7,1] , [2,8,7] , [0,1,7] , [0,7,6]
]
);
//translate([A3-a3-c3-P3,E3/2+N3,c3+O3])
translate([A3-a3-c3-P3,0,c3+O3])
translate([0,E3+0.6,0])
rotate([0,0,15])
translate([0,-E3/2,0])
translate([0,N3,0])
rotate([90,0,0]) cylinder(h=E3+N3,r=c3,center=true,$fn=fn1);
}
hull() {
translate([p4x1,E3/2,p4y1-3*F3]) rotate([90,0,0]) cylinder(h=E3+0.2,r=F3+0.4,center=true,$fn=fn1);
translate([p4x1,E3/2,p4y1]) rotate([90,0,0]) cylinder(h=E3+0.2,r=F3+0.4,center=true,$fn=fn1);
}
hull() {
translate([p4x2,E3/2,p4y2]) rotate([90,0,0]) cylinder(h=E3+0.2,r=F3+0.4,center=true,$fn=fn1);
translate([p4x2,E3/2,p4y2-3*F3]) rotate([90,0,0]) cylinder(h=E3+0.2,r=F3+0.4,center=true,$fn=fn1);
}
translate([A3-K3,E3/2,B3/2])rotate([90,0,0] )cylinder(h=E3+0.2,r=F3,center=true,$fn=fn1);
translate([A3-K3-I3,E3/2,B3/2])rotate([90,0,0] )cylinder(h=E3+0.2,r=F3,center=true,$fn=fn1);
translate([A3-K3-I3/2,E3/2,B3/2])cube([I3,E3+0.2,F3*2], center = true);
translate([A3-K3-J3,E3/2,B3/2])rotate([90,0,0] )cylinder(h=E3+0.2,r=F3,center=true,$fn=fn1);
translate([A3-K3-J3-I3,E3/2,B3/2])rotate([90,0,0] )cylinder(h=E3+0.2,r=F3,center=true,$fn=fn1);
translate([A3-K3-J3-I3/2,E3/2,B3/2])cube([I3,E3+0.2,F3*2], center = true);
translate([A3-a3-c3-P3,0,c3+O3])
translate([0,E3+0.6,0])
rotate([0,0,15])
translate([0,-E3/2,0])
union(){
translate([0,10,0]) rotate([90,0,0]) cylinder(h=E3+N3,r=C3,center=true,$fn=fn1);
translate([0,0,0]) rotate([90,0,0]) cylinder(h=E3+20,r=L3,center=true,$fn=fn1);
}
translate([0,-100,0]) cube([100,100,100]);
}
}
/************************************************************************************/
A4 = H3 ; // largo ranura vertical
B4 = K3 ; // separacion ranura vertical
C4 = 4 ; // espesor pieza
D4 = 10 ;
F4 = F1 ; // radio agujeros
a4 = 38 + B4; // altura
b4 = 35; // ancho
c4 = C4 ; // espesor
/*
p4x1 = B4;
p4y1 = a4 - B4;
p4x2 = p4x1 + 4;
p4y2 = p4y1 - 34;
*/
p4y3 = a4/3 ;
p4y4 = a4 * 2/3 ;
p4x3 = b4 - B4;
n4 = 8;
module adaptador() {
difference() {
translate([n4,0,n4])
minkowski() {
cube([b4-2*n4,c4,a4-2*n4]);
rotate([90,0,0])cylinder(r=n4,h=.0001,$fn=fn1);
}
translate([p4x1,c4/2,p4y1]) rotate([90,0,0]) cylinder(h=c4+0.2,r=F4+0.4,center=true,$fn=fn1);
translate([p4x2,c4/2,p4y2]) rotate([90,0,0]) cylinder(h=c4+0.2,r=F4+0.4,center=true,$fn=fn1);
translate([p4x3,c4/2,p4y3]) rotate([90,0,0]) cylinder(h=c4+0.2,r=F4,center=true,$fn=fn1);
translate([p4x3,c4/2,p4y4]) rotate([90,0,0]) cylinder(h=c4+0.2,r=F4,center=true,$fn=fn1);
}
}
/************************************************************************************/
// Show all
soporte();
translate([100,-5,-3])rotate([0,0,-90])
receptor();
translate([97.8,-20,0.2])
rotate([0,0,-90])
boquilla();
// Print all
/*
translate([5,5,E1]) rotate([-90,0,0])
boquilla();
translate([2*b2,60,I2]) rotate([0,-90,90])
receptor();
translate([0,0,0]) rotate([90,0,0])
soporte();
translate([100,5,C4]) rotate([-90,0,0])
adaptador();
*/