-
Notifications
You must be signed in to change notification settings - Fork 1
/
fan.scad
96 lines (85 loc) · 2.06 KB
/
fan.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
//written by Michiel Brink
//length fan,distance hole,circle diameter
//25,20,
//30,24,
//40,33,
//50,40,
//60,50,
//70,60,
//80,70,86
//90,83,100
//120,105,130
//140,125,150
length = 80;
holedistance = 70;
diameter = 86;
screwhole = 4.8;
//effect vars
//circles:
circlesThickness = 5;
circlesDistance = 5;
circlesCrossThickness = 5;
//holes:
holesDiameter = 5;
holesDistance = 2;
intersection() {
fanHole();
//choose one effect:
//none();
//circles();
holes();
}
screwHoles();
module fanHole() {
intersection() {
translate([-length/2,-length/2]){
square([length,length],0);
}
circle(diameter/2,0);
}
}
module screwHoles() {
translate([holedistance/2,holedistance/2]){
circle(screwhole/2,0);
}
translate([-holedistance/2,holedistance/2]){
circle(screwhole/2,0);
}
translate([-holedistance/2,-holedistance/2]){
circle(screwhole/2,0);
}
translate([holedistance/2,-holedistance/2]){
circle(screwhole/2,0);
}
}
module circles() {
//circles
for (x = [0:circlesDistance*2:60]) {
difference() {
circle(x+circlesThickness,0);
circle(x,0);
}
}
//cross
rotate([0,0,45]){
translate([-circlesCrossThickness/2,-length/2]){
square([circlesCrossThickness,length],0);
}
translate([-length/2,-circlesCrossThickness/2]){
square([length,circlesCrossThickness],0);
}
}
}
module holes() {
for (x = [0:holesDiameter+holesDistance:length]) {
for (y = [holesDiameter:holesDiameter+holesDistance*2:length]) {
translate([x-length/2,y-length/2]){
circle(holesDiameter/2,0);
}
translate([x-holesDistance/2-holesDiameter/2-length/2,y-holesDistance-holesDiameter/2-length/2]){
circle(holesDiameter/2,0);
}
}
}
}