author | Michael Krelin <hacker@klever.net> | 2016-06-11 14:21:48 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-06-11 14:21:48 (UTC) |
commit | 188652e0dbde274f1e4f24c6a02f4564921feb27 (patch) (unidiff) | |
tree | c42f9f4abeda7817813c164fb69acc269f65e99e | |
parent | 0398dd6a4e41ec26d48ad02caffc319f34cbfcb1 (diff) | |
download | fanductory-188652e0dbde274f1e4f24c6a02f4564921feb27.zip fanductory-188652e0dbde274f1e4f24c6a02f4564921feb27.tar.gz fanductory-188652e0dbde274f1e4f24c6a02f4564921feb27.tar.bz2 |
fix duct inner shape
-rw-r--r-- | fanduct.scad | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fanduct.scad b/fanduct.scad index 746f753..fa14b7a 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -1,162 +1,163 @@ | |||
1 | use <snapper.scad>; | 1 | use <snapper.scad>; |
2 | extrusion_width=.5; layer_height=.2; // print parameters | 2 | extrusion_width=.5; layer_height=.2; // print parameters |
3 | 3 | ||
4 | epsilon=.005; // for finer cuts | 4 | epsilon=.005; // for finer cuts |
5 | 5 | ||
6 | function hypothenuse(a,b) = sqrt(pow(a,2)+pow(b,2)); | 6 | function hypothenuse(a,b) = sqrt(pow(a,2)+pow(b,2)); |
7 | 7 | ||
8 | silicone_shell = 2; | 8 | silicone_shell = 2; |
9 | heater_clearance = max( | 9 | heater_clearance = max( |
10 | hypothenuse(16/2 +silicone_shell, 20-4.5 +silicone_shell),// E3D v6 | 10 | hypothenuse(16/2 +silicone_shell, 20-4.5 +silicone_shell),// E3D v6 |
11 | hypothenuse(11.5-4.5 +silicone_shell, 15.5 +silicone_shell)// E3D volcano | 11 | hypothenuse(11.5-4.5 +silicone_shell, 15.5 +silicone_shell)// E3D volcano |
12 | ); | 12 | ); |
13 | 13 | ||
14 | fanduct_elevation = 3; // fanduct elevation above nozzle tip | 14 | fanduct_elevation = 3; // fanduct elevation above nozzle tip |
15 | fanduct_blowtarget = -2; // what to blow at | 15 | fanduct_blowtarget = -2; // what to blow at |
16 | fanduct_h = 6; // inner height of the duct | 16 | fanduct_h = 6; // inner height of the duct |
17 | fanduct_w = 7; // inner width of the duct | 17 | fanduct_w = 7; // inner width of the duct |
18 | fanduct_shell=1.2; // shell thickness | 18 | fanduct_shell=1.2; // shell thickness |
19 | fanduct_ir = heater_clearance+5; // inner radius | 19 | fanduct_ir = heater_clearance+5; // inner radius |
20 | 20 | ||
21 | jet_angle = 60-2; // angular width of the jet | 21 | jet_angle = 60-2; // angular width of the jet |
22 | 22 | ||
23 | inlet_w = 12.5; // inlet width | 23 | inlet_w = 12.5; // inlet width |
24 | inlet_h = 17; // inlet height | 24 | inlet_h = 17; // inlet height |
25 | inlet_l = 7; // inlet length of protrusion (or depth of intrusion:)) | 25 | inlet_l = 7; // inlet length of protrusion (or depth of intrusion:)) |
26 | inlet_away = 15;// how far away inlet is | 26 | inlet_away = 15;// how far away inlet is |
27 | 27 | ||
28 | hotend_clearance = heater_clearance; | 28 | hotend_clearance = heater_clearance; |
29 | 29 | ||
30 | snapper_d = 8; snapper_overlap=0.2;// snip snap | 30 | snapper_d = 8; snapper_overlap=0.2;// snip snap |
31 | 31 | ||
32 | smooth_f = 120; | 32 | smooth_f = 120; |
33 | 33 | ||
34 | type="3jets"; // "3jets" ; // circular|3jets | 34 | type="3jets"; // "3jets" ; // circular|3jets |
35 | ductshape="square"; // square|round | 35 | ductshape="square"; // square|round |
36 | 36 | ||
37 | 37 | ||
38 | module fanduct(type=type,ductshape=ductshape) { | 38 | module fanduct(type=type,ductshape=ductshape) { |
39 | 39 | ||
40 | // ***duct is all around! | 40 | // ***duct is all around! |
41 | module duct(what) { | 41 | module duct(what) { |
42 | if(what=="in") { | 42 | if(what=="in") { |
43 | sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell; | 43 | sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell; |
44 | smax = max(sh,sv); | 44 | smax = max(sh,sv); |
45 | rotate_extrude($fn=smooth_f) | 45 | rotate_extrude($fn=smooth_f) |
46 | if(ductshape=="round") | 46 | if(ductshape=="round") |
47 | translate([sh/2+fanduct_ir,sv/2]) | 47 | translate([sh/2+fanduct_ir,sv/2]) |
48 | scale([sh/smax,sv/smax]) | 48 | scale([sh/smax,sv/smax]) |
49 | circle(d=smax,$fn=4*smax); | 49 | circle(d=smax,$fn=4*smax); |
50 | else if(ductshape=="square") | 50 | else if(ductshape=="square") |
51 | translate([fanduct_ir,0]) | 51 | translate([fanduct_ir,0]) |
52 | square([sh,sv]); | 52 | square([sh,sv]); |
53 | }else if(what=="out") { | 53 | }else if(what=="out") { |
54 | sh = fanduct_w; sv = fanduct_h; | 54 | sh = fanduct_w; sv = fanduct_h; |
55 | smax = max(sh,sv); | 55 | smax = max(sh,sv); |
56 | rotate_extrude($fn=smooth_f) | 56 | rotate_extrude($fn=smooth_f) |
57 | if(ductshape=="round") | 57 | if(ductshape=="round") |
58 | translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) | 58 | translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) |
59 | scale([sh/smax,sv/smax]) | 59 | scale([sh/smax,sv/smax]) |
60 | circle(d=smax,$fn=4*smax); | 60 | circle(d=smax,$fn=4*smax); |
61 | else if(ductshape=="square") | 61 | else if(ductshape=="square") |
62 | translate([fanduct_ir+fanduct_shell,fanduct_shell]) | 62 | translate([fanduct_ir+fanduct_shell,fanduct_shell]) |
63 | union() { | 63 | union() { |
64 | square([fanduct_w,fanduct_h/2]); | 64 | square([sh,sv/2]); |
65 | translate([fanduct_w/2,fanduct_h-fanduct_w/2]) | 65 | translate([sh/2,sv/2]) |
66 | rotate([0,0,90]) circle(d=fanduct_w,$fn=36); | 66 | scale([sh/smax,sv/smax]) |
67 | circle(d=smax,$fn=36); | ||
67 | } | 68 | } |
68 | } | 69 | } |
69 | } | 70 | } |
70 | 71 | ||
71 | // ***bumps for easier position adjustments in line with hotend | 72 | // ***bumps for easier position adjustments in line with hotend |
72 | module marks(what) { | 73 | module marks(what) { |
73 | if(what=="in") { | 74 | if(what=="in") { |
74 | for(y=[-1,1]) | 75 | for(y=[-1,1]) |
75 | hull() for(z=[0,-fanduct_shell-fanduct_h/2]) | 76 | hull() for(z=[0,-fanduct_shell-fanduct_h/2]) |
76 | translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) | 77 | translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) |
77 | rotate([90,0,0]) { | 78 | rotate([90,0,0]) { |
78 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); | 79 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); |
79 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) | 80 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) |
80 | sphere(r=fanduct_shell,$fn=30); | 81 | sphere(r=fanduct_shell,$fn=30); |
81 | } | 82 | } |
82 | } | 83 | } |
83 | } | 84 | } |
84 | 85 | ||
85 | // ***output | 86 | // ***output |
86 | module output(what,type=type) { | 87 | module output(what,type=type) { |
87 | module guideline(xyxy) { | 88 | module guideline(xyxy) { |
88 | module pin(xy) { | 89 | module pin(xy) { |
89 | translate([xy[0],xy[1],0]) | 90 | translate([xy[0],xy[1],0]) |
90 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); | 91 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); |
91 | } | 92 | } |
92 | xyxyxy=concat(xyxy,[[0,0]]); | 93 | xyxyxy=concat(xyxy,[[0,0]]); |
93 | for(i=[0:1:len(xyxyxy)-2]) | 94 | for(i=[0:1:len(xyxyxy)-2]) |
94 | hull() for(j=[i,i+1]) pin(xyxyxy[j]); | 95 | hull() for(j=[i,i+1]) pin(xyxyxy[j]); |
95 | } | 96 | } |
96 | 97 | ||
97 | module circus(what) { | 98 | module circus(what) { |
98 | if(what=="in") { | 99 | if(what=="in") { |
99 | difference() { | 100 | difference() { |
100 | rotate_extrude($fn=smooth_f) | 101 | rotate_extrude($fn=smooth_f) |
101 | polygon([ | 102 | polygon([ |
102 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], | 103 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], |
103 | [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], | 104 | [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], |
104 | [fanduct_ir+fanduct_shell+fanduct_w/2,0], | 105 | [fanduct_ir+fanduct_shell+fanduct_w/2,0], |
105 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); | 106 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); |
106 | translate([0,0,-1]) | 107 | translate([0,0,-1]) |
107 | cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); | 108 | cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); |
108 | mirror([0,0,1]) | 109 | mirror([0,0,1]) |
109 | translate([0,0,-epsilon]) | 110 | translate([0,0,-epsilon]) |
110 | cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2); | 111 | cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2); |
111 | } | 112 | } |
112 | }else if(what=="out") { | 113 | }else if(what=="out") { |
113 | rotate_extrude($fn=smooth_f) | 114 | rotate_extrude($fn=smooth_f) |
114 | polygon([ | 115 | polygon([ |
115 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], | 116 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], |
116 | [fanduct_ir+fanduct_shell+1,fanduct_h/2], | 117 | [fanduct_ir+fanduct_shell+1,fanduct_h/2], |
117 | [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell], | 118 | [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell], |
118 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); | 119 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); |
119 | }else if(what=="airguides") { | 120 | }else if(what=="airguides") { |
120 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; | 121 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; |
121 | union() { | 122 | union() { |
122 | for(my=[0,1]) mirror([0,my,0]) { | 123 | for(my=[0,1]) mirror([0,my,0]) { |
123 | guideline([ | 124 | guideline([ |
124 | [-our,inlet_w/6], | 125 | [-our,inlet_w/6], |
125 | [-inr*sin(60),inr*cos(60)] | 126 | [-inr*sin(60),inr*cos(60)] |
126 | ]); | 127 | ]); |
127 | a0=30; as=15; a1=180; | 128 | a0=30; as=15; a1=180; |
128 | for(a=[a0+as:as:a1]) { | 129 | for(a=[a0+as:as:a1]) { |
129 | f = as/(a1-a+as); | 130 | f = as/(a1-a+as); |
130 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); | 131 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); |
131 | } | 132 | } |
132 | guideline([ | 133 | guideline([ |
133 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], | 134 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], |
134 | [-inr*cos(10),inr*sin(10)] | 135 | [-inr*cos(10),inr*sin(10)] |
135 | ]); | 136 | ]); |
136 | } | 137 | } |
137 | }/*union*/ | 138 | }/*union*/ |
138 | }/*airguides*/ | 139 | }/*airguides*/ |
139 | } | 140 | } |
140 | 141 | ||
141 | module jets(what) { | 142 | module jets(what) { |
142 | od = fanduct_h/2+fanduct_shell; | 143 | od = fanduct_h/2+fanduct_shell; |
143 | md = fanduct_ir+fanduct_shell+fanduct_w/2; | 144 | md = fanduct_ir+fanduct_shell+fanduct_w/2; |
144 | jww = 2*md*sin(jet_angle/2); | 145 | jww = 2*md*sin(jet_angle/2); |
145 | render(convexity=8) difference() { | 146 | render(convexity=8) difference() { |
146 | for(a=[0:120:359]) rotate([0,0,a]) { | 147 | for(a=[0:120:359]) rotate([0,0,a]) { |
147 | if(what=="in") { | 148 | if(what=="in") { |
148 | hull() { | 149 | hull() { |
149 | render(convexity=4) intersection() { | 150 | render(convexity=4) intersection() { |
150 | translate([md-fanduct_shell-fanduct_w/2,-jww/2,0]) | 151 | translate([md-fanduct_shell-fanduct_w/2,-jww/2,0]) |
151 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); | 152 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); |
152 | duct(what=what); | 153 | duct(what=what); |
153 | } | 154 | } |
154 | translate([0,0,-fanduct_elevation]) sphere(r=.5); | 155 | translate([0,0,-fanduct_elevation]) sphere(r=.5); |
155 | } | 156 | } |
156 | }else if(what=="out") { | 157 | }else if(what=="out") { |
157 | hull() { | 158 | hull() { |
158 | render(convexity=4) intersection() { | 159 | render(convexity=4) intersection() { |
159 | translate([md-fanduct_w/2-fanduct_shell,-jww/2+fanduct_shell,fanduct_shell]) | 160 | translate([md-fanduct_w/2-fanduct_shell,-jww/2+fanduct_shell,fanduct_shell]) |
160 | cube(size=[fanduct_w/2+fanduct_shell,jww-2*fanduct_shell,od-2*fanduct_shell]); | 161 | cube(size=[fanduct_w/2+fanduct_shell,jww-2*fanduct_shell,od-2*fanduct_shell]); |
161 | duct(what=what); | 162 | duct(what=what); |
162 | } | 163 | } |