From f4dfd735eb2b005b93d63ad3f7d4371e612b72ce Mon Sep 17 00:00:00 2001 From: finga Date: Thu, 10 Apr 2025 15:07:06 +0200 Subject: [PATCH] Add model for the tape fan [WIP] --- tape_fan.scad | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tape_fan.scad diff --git a/tape_fan.scad b/tape_fan.scad new file mode 100644 index 0000000..59b818c --- /dev/null +++ b/tape_fan.scad @@ -0,0 +1,44 @@ +$fn = 200; + +w = 1; +h = 1; + +function fn(a, b) = round(sqrt(pow(a[0]-b[0],2) + (pow(a[1]-b[1], 2)))); + +module shape(i) cylinder(h, max(w/2*((i^2.1)*0.01),0.5), max(w/2*((i^2.1)*0.01),0.5), $fn=12); + +function b_pts(pts, n, idx) = + len(pts)>2 ? + b_pts([for(i=[0:len(pts)-2])pts[i]], n, idx) * n*idx + + b_pts([for(i=[1:len(pts)-1])pts[i]], n, idx) * (1-n*idx) + : pts[0] * n*idx + + pts[1] * (1-n*idx); + +module b_curve(pts) + let (idx=fn(pts[0], pts[len(pts)-1]), n = 1/idx) { + for (i= [0:idx-1]) + hull(){ + translate(b_pts(pts, n, i)) shape(i); // change i to 1 for constant with + translate(b_pts(pts, n, i+1)) shape(i); // change i to 1 for constant with + }; +} + +module spike() { + polygon([[0, 0], [10, 0], [5, 50]]); +} + +blade = 8; + +module fan() { + for (i = [0 : blade]){ + rotate( i * 360/blade, [0, 0, 1]) + b_curve([[0, 0], [20, 30], [10, 45], [0, 37]]); + } + + cylinder(h, d = 35); +} + +difference() { + fan(); + cylinder(h, d = 5); +};