-
Notifications
You must be signed in to change notification settings - Fork 3
/
fan-blades.scad
145 lines (119 loc) · 3.61 KB
/
fan-blades.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
include <MCAD/units/metric.scad>
use <MCAD/array/along_curve.scad>
use <MCAD/shapes/cylinder.scad>
use <scad-utils/transformations.scad>
use <scad-utils/shapes.scad>
use <MCAD/general/sweep.scad>
use <MCAD/shapes/2Dshapes.scad>
number_of_blades = 6;
wall_thickness = 0.8;
hub_d = 22.6;
hub_od = hub_d + wall_thickness * 2;
propeller_d = 37;
blade_height = 7.15;
blade_thickness = 0.8;
blade_pitch = 60; // average, because it's parabolic
blade_direction = -1; // -1 for counter-clockwise, 1 for clockwise
blade_shape = "parabolic"; // "parabolic" or "linear"
winglets = false;
winglet_thickness = 1;
winglet_length = 2;
winglet_direction = 1; // 1 for underside of blade, -1 for upper
shroud = true;
shroud_thickness = 0.4;
tab_internal_angle = 10;
tab_thickness = 0.2;
number_of_tabs = 5;
tab_width = 0.2;
$fs = 0.4;
$fa = 1;
hub ();
mcad_rotate_multiply (number_of_blades, axis = Z)
translate ([0- epsilon, 0, 0])
blade ();
if (shroud)
shroud ();
module hub ()
{
difference () {
cylinder (d = hub_od, h = blade_height);
translate ([0, 0, wall_thickness])
mcad_rounded_cylinder (d = hub_od - wall_thickness * 2,
h = blade_height * 2,
round_r1 = 1,
slices = 100
);
translate ([0, 0, -epsilon])
cylinder (d = hub_od - wall_thickness * 4,
h = blade_height * 2);
}
translate ([0, 0, blade_height])
mcad_rotate_multiply (number_of_tabs)
tab ();
}
module tab ()
{
linear_extrude (height = tab_thickness) {
intersection () {
difference () {
circle (d = hub_od);
circle (d = hub_od - (tab_width + wall_thickness) * 2);
}
pieSlice (hub_od, -tab_internal_angle / 2, tab_internal_angle / 2);
}
}
}
module blade ()
{
lead_r = (propeller_d - hub_od) / 2;
blade_angle = tan (90 - blade_pitch) * blade_height / (PI * 2 * lead_r) * 360;
function parabolic_twist (t) = ((pow (t, 2) + 0.5 * t) * blade_angle *
blade_direction);
function linear_twist (t) = (t * blade_angle * blade_direction);
function twist (t) = (
(blade_shape == "parabolic") ? parabolic_twist (t) :
linear_twist (t)
);
blade_length = propeller_d / 2;
base_shape = rectangle_profile ([blade_length,
tan (blade_pitch) * blade_thickness]);
blade_transforms = [
for (t = [0 : 0.01 : 1.005])
rotation ([0, 0, twist (t)]) *
translation ([blade_length / 2, 0, (1 - t) * blade_height])
];
winglet_shape = rectangle_profile ([winglet_thickness, winglet_length]);
winglet_transforms = [
for (i = [0 : len (blade_transforms) - 1])
let (
transform = blade_transforms[i],
scale_ = max (0.01,
(len (blade_transforms) - i) / len (blade_transforms)
)
)
transform *
translation ([
-winglet_thickness / 2 + blade_length / 2,
(scale_ * winglet_length / 2 * winglet_direction *
blade_direction),
0
]) *
scaling ([1, scale_, 1])
];
render ()
difference () {
union () {
sweep (base_shape, blade_transforms);
if (winglets)
sweep (winglet_shape, winglet_transforms);
}
translate ([0, 0, -epsilon])
cylinder (d = hub_od - epsilon * 2, h = blade_height + epsilon * 2);
}
}
module shroud ()
{
rotate_extrude ()
translate ([-shroud_thickness / 2 + propeller_d / 2, 0])
square ([shroud_thickness, blade_height]);
}