-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilter.scad
128 lines (120 loc) · 3.74 KB
/
filter.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
$fn=60;
filter=[72.5,110,20];
fan_dia=116;
sthickness=20;
//filter_120();
fan_grill(blank=true);
//cover();
module assemble(){
translate([0, 0, -2]) fan_120(thickness=4);
translate([0, 0, 10]) filter_120();
for(X=[-1,1]) translate([((filter[0]+1)/2)*X, 0, 30]) filter();
translate([0,0,sthickness/2+filter[2]+1]) cover();
}
module cover(){
difference(){
union(){
cube([filter[0]*2+5, filter[1]+4, filter[2]+2], center=true);
translate([0,0,-filter[2]+4])
cube([filter[0]*2+5, filter[1], filter[2]+2], center=true);
for(Y=[-0.5,1])
hull(){
translate([0,(filter[1]-8)/2*Y,filter[2]/2])
cube([filter[0]*2+5,8,1], center=true);
for(X=[-1,1])
translate([(filter[0]+8)*X,(filter[1]-8)/2*Y,-filter[2]*1.5+3])
cylinder(d=8, h=4);
}
}
for(X=[-1,1]){
translate([((filter[0]+1)/2)*X, 0, filter[2]-filter[2]/2])
cube([filter[0]-12,filter[1]-12,4], center=true);
}
translate([0,0,-1])
cube([filter[0]*2+2, filter[1]+2, filter[2]+2], center=true);
translate([0,0,-filter[2]-2])
cube([filter[0]*2+3, filter[1]+5, filter[2]+2], center=true);
for(Y=[-0.5,1], X=[-1,1])
translate([(filter[0]+8)*X,(filter[1]-8)/2*Y,-filter[2]*1.5+2])
cylinder(d=3.2, h=10);
}
}
module filter_120(){
difference(){
union(){
cube([filter[0]*2+1, filter[1]+10, sthickness], center=true);
hull()
for(X=[-1,1])
translate([(filter[0]+sthickness/2)*X,-filter[1]/2-2,0])
rotate([90,0,0]) cylinder(d=sthickness, h=4);
for(Y=[-0.5,1])
hull()
for(X=[-1,1])
translate([(filter[0]+8)*X,(filter[1]-8)/2*Y,-sthickness/2])
cylinder(d=8, h=4);
}
for(X=[-1,1]){
translate([0,0,-sthickness/2]) hull(){
translate([((filter[0]+1)/2)*X, 0, sthickness])
cube([filter[0]-12,filter[1]-12,0.1], center=true);
intersection(){
cylinder(d=fan_dia, h=0.1, center=true);
translate([fan_dia/4*X,0,0])
cube([fan_dia/2, fan_dia, 0.1], center=true);
}
}
for(Y=[-0.5,1], X=[-1,1])
translate([(filter[0]+8)*X,(filter[1]-8)/2*Y,-sthickness/2])
cylinder(d=4, h=6);
translate([(filter[0]+sthickness/2)*X,-filter[1]/2-2,0])
rotate([90,0,0]) cylinder(d=4, h=6);
}
for(X=[-1,1], Y=[-1,1]) translate([52.5*X, 52.5*Y, 0]){
cylinder(d=5, h=sthickness+2, center=true);
hull()
for(Y2=[0,-6])
translate([0, Y2*Y, 3])
cylinder(d=8, h=sthickness+2, center=true);
}
}
}
module fan_base(thickness=5){
difference(){
hull()
for(X=[-1,1], Y=[-1,1])
translate([56*X, 56*Y, 0])
cylinder(d=8, h=thickness, center=true);
for(X=[-1,1], Y=[-1,1])
translate([52.5*X, 52.5*Y, 0])
cylinder(d=4, h=thickness+2, center=true);
}
}
module fan_120(thickness=25){
difference(){
fan_base(thickness);
cylinder(d=116, h=thickness+2, center=true);
}
}
module fan_grill(thickness=3, blank=false){
difference(){
fan_base(thickness);
if( ! blank )
intersection(){
cylinder(d=117, h=thickness+2, center=true);
for(X=[-6:1:6], Y=[-6:1:6]){
translate([10*X+5*(Y%2),9*Y,0]) rotate([0,0,30])
cylinder(d=10,h=thickness+1, $fn=6, center=true);
}
}
}
}
module filter(){
color("white")
difference(){
cube([filter[0],filter[1],filter[2]], center=true);
translate([0,0,-1+filter[2]/2])
cube([filter[0]-12,filter[1]-12,3], center=true);
translate([0,0,-filter[2]/2])
cube([filter[0]-12,filter[1]-12,1], center=true);
}
}