summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--fanduct.scad29
1 files changed, 21 insertions, 8 deletions
diff --git a/fanduct.scad b/fanduct.scad
index 53630a3..746f753 100644
--- a/fanduct.scad
+++ b/fanduct.scad
@@ -34,5 +34,6 @@ smooth_f = 120;
34type="3jets"; // "3jets" ; // circular|3jets 34type="3jets"; // "3jets" ; // circular|3jets
35ductshape="square"; // square|round
35 36
36 37
37module fanduct(type=type) { 38module fanduct(type=type,ductshape=ductshape) {
38 39
@@ -44,5 +45,9 @@ module fanduct(type=type) {
44 rotate_extrude($fn=smooth_f) 45 rotate_extrude($fn=smooth_f)
45 translate([sh/2+fanduct_ir,sv/2]) 46 if(ductshape=="round")
46 scale([sh/smax,sv/smax]) 47 translate([sh/2+fanduct_ir,sv/2])
47 circle(d=smax,$fn=4*smax); 48 scale([sh/smax,sv/smax])
49 circle(d=smax,$fn=4*smax);
50 else if(ductshape=="square")
51 translate([fanduct_ir,0])
52 square([sh,sv]);
48 }else if(what=="out") { 53 }else if(what=="out") {
@@ -51,5 +56,13 @@ module fanduct(type=type) {
51 rotate_extrude($fn=smooth_f) 56 rotate_extrude($fn=smooth_f)
52 translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) 57 if(ductshape=="round")
53 scale([sh/smax,sv/smax]) 58 translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell])
54 circle(d=smax,$fn=4*smax); 59 scale([sh/smax,sv/smax])
60 circle(d=smax,$fn=4*smax);
61 else if(ductshape=="square")
62 translate([fanduct_ir+fanduct_shell,fanduct_shell])
63 union() {
64 square([fanduct_w,fanduct_h/2]);
65 translate([fanduct_w/2,fanduct_h-fanduct_w/2])
66 rotate([0,0,90]) circle(d=fanduct_w,$fn=36);
67 }
55 } 68 }
@@ -242,3 +255,3 @@ module fanduct(type=type) {
242 255
243view="full"; // hcut|vcut|* 256view="vcut"; // hcut|vcut|*
244 257