summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--fanduct.scad22
1 files changed, 12 insertions, 10 deletions
diff --git a/fanduct.scad b/fanduct.scad
index 541a037..b8994d4 100644
--- a/fanduct.scad
+++ b/fanduct.scad
@@ -83,33 +83,30 @@ module fanduct(type=type) {
83 polygon([ 83 polygon([
84 [0,-fanduct_elevation], 84 [0,-fanduct_elevation],
85 [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], 85 [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2],
86 [fanduct_ir+fanduct_shell+fanduct_w/2,0], 86 [fanduct_ir+fanduct_shell+fanduct_w/2,0],
87 [0,-fanduct_elevation-.1]]); 87 [0,-fanduct_elevation-.1]]);
88 translate([0,0,-1]) 88 translate([0,0,-1])
89 cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); 89 cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f);
90 mirror([0,0,1]) 90 mirror([0,0,1])
91 translate([0,0,-epsilon]) 91 translate([0,0,-epsilon])
92 cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2); 92 cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2);
93 } 93 }
94 }else if(what=="out") { 94 }else if(what=="out") {
95 difference() { 95 rotate_extrude($fn=smooth_f)
96 rotate_extrude($fn=smooth_f) 96 polygon([
97 polygon([ 97 [0,-fanduct_elevation],
98 [0,-fanduct_elevation], 98 [fanduct_ir+fanduct_shell+1,fanduct_h/2],
99 [fanduct_ir+fanduct_shell+1,fanduct_h/2], 99 [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell],
100 [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell], 100 [0,-fanduct_elevation-.1]]);
101 [0,-fanduct_elevation-.1]]);
102 circus("airguides");
103 }
104 }else if(what=="airguides") { 101 }else if(what=="airguides") {
105 inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; 102 inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w;
106 union() { 103 union() {
107 for(my=[0,1]) mirror([0,my,0]) { 104 for(my=[0,1]) mirror([0,my,0]) {
108 guideline([ 105 guideline([
109 [-our,inlet_w/6], 106 [-our,inlet_w/6],
110 [-inr*sin(60),inr*cos(60)] 107 [-inr*sin(60),inr*cos(60)]
111 ]); 108 ]);
112 a0=30; as=15; a1=180; 109 a0=30; as=15; a1=180;
113 for(a=[a0+as:as:a1]) { 110 for(a=[a0+as:as:a1]) {
114 f = as/(a1-a+as); 111 f = as/(a1-a+as);
115 rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); 112 rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]);
@@ -218,25 +215,30 @@ module fanduct(type=type) {
218 duct(what); 215 duct(what);
219 marks(what); 216 marks(what);
220 output(what); 217 output(what);
221 intake(what); 218 intake(what);
222 tails(what); 219 tails(what);
223 } 220 }
224 } 221 }
225 222
226 difference() { 223 difference() {
227 parts("in"); 224 parts("in");
228 parts("out"); 225 parts("out");
229 } 226 }
230 227 intersection() {
228 output("airguides");
229 union() {
230 duct("in"); output("in"); intake("in");
231 }
232 }
231} 233}
232 234
233view="full"; // hcut|vcut|* 235view="full"; // hcut|vcut|*
234 236
235hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away); 237hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away);
236vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h); 238vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h);
237if(view=="hcut") { 239if(view=="hcut") {
238 difference() { 240 difference() {
239 fanduct(); 241 fanduct();
240 translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2]) 242 translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2])
241 cube(size=[hinfinity,hinfinity,vinfinity]); 243 cube(size=[hinfinity,hinfinity,vinfinity]);
242 } 244 }