summaryrefslogtreecommitdiffabout
path: root/fanduct.scad
authorMichael Krelin <hacker@klever.net>2016-05-29 21:08:16 (UTC)
committer Michael Krelin <hacker@klever.net>2016-05-29 21:08:16 (UTC)
commit6369f8a5865e1ce85d5b7a0520da47adbe86eba1 (patch) (unidiff)
treeb093571f31a5d7dbb2b559b0e66f95a0a2b87639 /fanduct.scad
parent477b5dff0c93243b93f03e51bca541b465b6f1f5 (diff)
downloadfanductory-6369f8a5865e1ce85d5b7a0520da47adbe86eba1.zip
fanductory-6369f8a5865e1ce85d5b7a0520da47adbe86eba1.tar.gz
fanductory-6369f8a5865e1ce85d5b7a0520da47adbe86eba1.tar.bz2
deeper marks going halfway down
Diffstat (limited to 'fanduct.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--fanduct.scad14
1 files changed, 8 insertions, 6 deletions
diff --git a/fanduct.scad b/fanduct.scad
index 235c079..e16c5ae 100644
--- a/fanduct.scad
+++ b/fanduct.scad
@@ -1,155 +1,157 @@
1use <snapper.scad>; 1use <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 heater_w = 16; // heatblock width 6 heater_w = 16; // heatblock width
7 heater_l = 20; // heatblock length 7 heater_l = 20; // heatblock length
8 nozzle_offset=4.5;// nozzle offset from the edge of heatblock 8 nozzle_offset=4.5;// nozzle offset from the edge of heatblock
9 9
10 fanduct_elevation = 3; // fanduct elevation above nozzle tip 10 fanduct_elevation = 3; // fanduct elevation above nozzle tip
11 fanduct_h = 6; // inner height of the duct 11 fanduct_h = 6; // inner height of the duct
12 fanduct_w = 6; // inner width of the duct 12 fanduct_w = 6; // inner width of the duct
13 fanduct_shell=1.2; // shell thickness 13 fanduct_shell=1.2; // shell thickness
14 fanduct_ir = sqrt(pow(heater_w/2,2)+pow(heater_l-nozzle_offset,2))+5;// inner radius 14 fanduct_ir = sqrt(pow(heater_w/2,2)+pow(heater_l-nozzle_offset,2))+5;// inner radius
15 15
16 jet_angle = 60; // angular width of the jet 16 jet_angle = 60; // angular width of the jet
17 17
18 inlet_w = 12.5; // inlet width 18 inlet_w = 12.5; // inlet width
19 inlet_h = 17; // inlet height 19 inlet_h = 17; // inlet height
20 inlet_l = 7; // inlet length of protrusion (or depth of intrusion:)) 20 inlet_l = 7; // inlet length of protrusion (or depth of intrusion:))
21 inlet_away = 15;// how far away inlet is 21 inlet_away = 15;// how far away inlet is
22 22
23hotend_clearance = 12; 23hotend_clearance = 12;
24 24
25 snapper_d = 8; snapper_overlap=0.2;// snip snap 25 snapper_d = 8; snapper_overlap=0.2;// snip snap
26 26
27smooth_f = 120; 27smooth_f = 120;
28 28
29type="3jets"; // "3jets" ; // circular|3jets 29type="3jets"; // "3jets" ; // circular|3jets
30 30
31 31
32module fanduct(type=type) { 32module fanduct(type=type) {
33 33
34 // ***duct is all around! 34 // ***duct is all around!
35 module duct(what) { 35 module duct(what) {
36 if(what=="in") { 36 if(what=="in") {
37 rotate_extrude($fn=smooth_f) 37 rotate_extrude($fn=smooth_f)
38 translate([fanduct_ir,0]) 38 translate([fanduct_ir,0])
39 square([fanduct_w+2*fanduct_shell,fanduct_h+2*fanduct_shell]); 39 square([fanduct_w+2*fanduct_shell,fanduct_h+2*fanduct_shell]);
40 }else if(what=="out") { 40 }else if(what=="out") {
41 rotate_extrude($fn=smooth_f) 41 rotate_extrude($fn=smooth_f)
42 translate([fanduct_ir+fanduct_shell,fanduct_shell]) 42 translate([fanduct_ir+fanduct_shell,fanduct_shell])
43 union() { 43 union() {
44 square([fanduct_w,fanduct_h/2]); 44 square([fanduct_w,fanduct_h/2]);
45 translate([fanduct_w/2,fanduct_h-fanduct_w/2]) 45 translate([fanduct_w/2,fanduct_h-fanduct_w/2])
46 rotate([0,0,90]) circle(d=fanduct_w,$fn=36); 46 rotate([0,0,90]) circle(d=fanduct_w,$fn=36);
47 } 47 }
48 } 48 }
49 } 49 }
50 50
51 // ***bumps for easier position adjustments in line with hotend 51 // ***bumps for easier position adjustments in line with hotend
52 module marks(what) { 52 module marks(what) {
53 if(what=="in") { 53 if(what=="in") {
54 for(y=[-1,1]) translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h]) 54 for(y=[-1,1])
55 rotate([90,0,0]) { 55 hull() for(z=[0,-fanduct_shell-fanduct_h/2])
56 cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); 56 translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z])
57 for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) 57 rotate([90,0,0]) {
58 sphere(r=fanduct_shell,$fn=30); 58 cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30);
59 } 59 for(z=[-1,1]) translate([0,0,z*fanduct_w/2])
60 sphere(r=fanduct_shell,$fn=30);
61 }
60 } 62 }
61 } 63 }
62 64
63 // ***output 65 // ***output
64 module output(what,type=type) { 66 module output(what,type=type) {
65 module guideline(xyxy) { 67 module guideline(xyxy) {
66 module pin(xy) { 68 module pin(xy) {
67 translate([xy[0],xy[1],0]) 69 translate([xy[0],xy[1],0])
68 cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); 70 cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6);
69 } 71 }
70 xyxyxy=concat(xyxy,[[0,0]]); 72 xyxyxy=concat(xyxy,[[0,0]]);
71 for(i=[0:1:len(xyxyxy)-2]) 73 for(i=[0:1:len(xyxyxy)-2])
72 hull() for(j=[i,i+1]) pin(xyxyxy[j]); 74 hull() for(j=[i,i+1]) pin(xyxyxy[j]);
73 } 75 }
74 76
75 module circus(what) { 77 module circus(what) {
76 if(what=="in") { 78 if(what=="in") {
77 difference() { 79 difference() {
78 rotate_extrude($fn=smooth_f) 80 rotate_extrude($fn=smooth_f)
79 polygon([ 81 polygon([
80 [0,-fanduct_elevation], 82 [0,-fanduct_elevation],
81 [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], 83 [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2],
82 [fanduct_ir+fanduct_shell,0], 84 [fanduct_ir+fanduct_shell,0],
83 [0,-fanduct_elevation-.1]]); 85 [0,-fanduct_elevation-.1]]);
84 translate([0,0,-1]) 86 translate([0,0,-1])
85 cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); 87 cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f);
86 mirror([0,0,1]) 88 mirror([0,0,1])
87 translate([0,0,-epsilon]) 89 translate([0,0,-epsilon])
88 cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2); 90 cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2);
89 } 91 }
90 }else if(what=="out") { 92 }else if(what=="out") {
91 difference() { 93 difference() {
92 rotate_extrude($fn=smooth_f) 94 rotate_extrude($fn=smooth_f)
93 polygon([ 95 polygon([
94 [0,-fanduct_elevation], 96 [0,-fanduct_elevation],
95 [fanduct_ir+fanduct_shell+1,fanduct_h/2], 97 [fanduct_ir+fanduct_shell+1,fanduct_h/2],
96 [fanduct_ir+fanduct_shell+1,fanduct_shell], 98 [fanduct_ir+fanduct_shell+1,fanduct_shell],
97 [0,-fanduct_elevation-.1]]); 99 [0,-fanduct_elevation-.1]]);
98 circus("airguides"); 100 circus("airguides");
99 } 101 }
100 }else if(what=="airguides") { 102 }else if(what=="airguides") {
101 inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; 103 inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w;
102 union() { 104 union() {
103 for(my=[0,1]) mirror([0,my,0]) { 105 for(my=[0,1]) mirror([0,my,0]) {
104 guideline([ 106 guideline([
105 [-our,inlet_w/6], 107 [-our,inlet_w/6],
106 [-inr*sin(60),inr*cos(60)] 108 [-inr*sin(60),inr*cos(60)]
107 ]); 109 ]);
108 a0=30; as=15; a1=180; 110 a0=30; as=15; a1=180;
109 for(a=[a0+as:as:a1]) { 111 for(a=[a0+as:as:a1]) {
110 f = as/(a1-a+as); 112 f = as/(a1-a+as);
111 rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); 113 rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]);
112 } 114 }
113 guideline([ 115 guideline([
114 [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], 116 [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4],
115 [-inr*cos(10),inr*sin(10)] 117 [-inr*cos(10),inr*sin(10)]
116 ]); 118 ]);
117 } 119 }
118 }/*union*/ 120 }/*union*/
119 }/*airguides*/ 121 }/*airguides*/
120 } 122 }
121 123
122 module jets(what) { 124 module jets(what) {
123 od = fanduct_h/2+fanduct_shell; 125 od = fanduct_h/2+fanduct_shell;
124 difference() { 126 difference() {
125 for(a=[0:120:359]) rotate([0,0,a]) { 127 for(a=[0:120:359]) rotate([0,0,a]) {
126 if(what=="in") { 128 if(what=="in") {
127 hull() { 129 hull() {
128 translate([fanduct_ir+od/2,0,od/2]) 130 translate([fanduct_ir+od/2,0,od/2])
129 rotate([90,0,0]) 131 rotate([90,0,0])
130 cylinder(d=od,h=2*(fanduct_ir+fanduct_shell+fanduct_w/2)*sin(jet_angle/2)-3,center=true,$fn=36); 132 cylinder(d=od,h=2*(fanduct_ir+fanduct_shell+fanduct_w/2)*sin(jet_angle/2)-3,center=true,$fn=36);
131 translate([0,0,-fanduct_elevation]) sphere(r=.5); 133 translate([0,0,-fanduct_elevation]) sphere(r=.5);
132 } 134 }
133 }else if(what=="out") { 135 }else if(what=="out") {
134 hull() { 136 hull() {
135 translate([fanduct_ir+od/2,0,od/2]) 137 translate([fanduct_ir+od/2,0,od/2])
136 rotate([90,0,0]) 138 rotate([90,0,0])
137 cylinder(d=od-2*fanduct_shell,h=2*(fanduct_ir+fanduct_shell+fanduct_w/2)*sin(jet_angle/2)-3-2*fanduct_shell,center=true); 139 cylinder(d=od-2*fanduct_shell,h=2*(fanduct_ir+fanduct_shell+fanduct_w/2)*sin(jet_angle/2)-3-2*fanduct_shell,center=true);
138 translate([0,0,-fanduct_elevation]) sphere(r=.2); 140 translate([0,0,-fanduct_elevation]) sphere(r=.2);
139 } 141 }
140 } 142 }
141 } 143 }
142 if(what=="in") { 144 if(what=="in") {
143 translate([0,0,-fanduct_elevation-2+epsilon]) 145 translate([0,0,-fanduct_elevation-2+epsilon])
144 cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); 146 cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2);
145 translate([0,0,-hotend_clearance]) 147 translate([0,0,-hotend_clearance])
146 rotate([0,0,30]) 148 rotate([0,0,30])
147 cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); 149 cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6);
148 } 150 }
149 } 151 }
150 } 152 }
151 153
152 if(type=="circular") circus(what); 154 if(type=="circular") circus(what);
153 else if(type=="3jets") jets(what); 155 else if(type=="3jets") jets(what);
154 } 156 }
155 157