summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2016-06-13 16:00:57 (UTC)
committer Michael Krelin <hacker@klever.net>2016-06-13 16:00:57 (UTC)
commitdb98325df397142e712aceca25a822c84a742b45 (patch) (unidiff)
tree06b1a0347668729b10ba47d10ea78edc124d7c5b
parentddcb05f6038a09c767a612a2d8ce984ef6589930 (diff)
downloadfanductory-db98325df397142e712aceca25a822c84a742b45.zip
fanductory-db98325df397142e712aceca25a822c84a742b45.tar.gz
fanductory-db98325df397142e712aceca25a822c84a742b45.tar.bz2
dualism: marks
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--fanduct.scad2
1 files changed, 1 insertions, 1 deletions
diff --git a/fanduct.scad b/fanduct.scad
index 0cd89f7..1090e95 100644
--- a/fanduct.scad
+++ b/fanduct.scad
@@ -64,97 +64,97 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) {
64 sh = fanduct_w; sv = fanduct_h; 64 sh = fanduct_w; sv = fanduct_h;
65 smax = max(sh,sv); 65 smax = max(sh,sv);
66 rotate_extrude($fn=smooth_f) 66 rotate_extrude($fn=smooth_f)
67 if(ductshape=="round") 67 if(ductshape=="round")
68 translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) 68 translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell])
69 scale([sh/smax,sv/smax]) 69 scale([sh/smax,sv/smax])
70 circle(d=smax,$fn=4*smax); 70 circle(d=smax,$fn=4*smax);
71 else if(ductshape=="square") 71 else if(ductshape=="square")
72 translate([fanduct_ir+fanduct_shell,fanduct_shell]) 72 translate([fanduct_ir+fanduct_shell,fanduct_shell])
73 union() { 73 union() {
74 square([sh,sv/2]); 74 square([sh,sv/2]);
75 translate([sh/2,sv/2]) 75 translate([sh/2,sv/2])
76 scale([sh/smax,sv/smax]) 76 scale([sh/smax,sv/smax])
77 circle(d=smax,$fn=36); 77 circle(d=smax,$fn=36);
78 } 78 }
79 } 79 }
80 } 80 }
81 module dual() { 81 module dual() {
82 module hulls(spots=dual_spots) { 82 module hulls(spots=dual_spots) {
83 for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() { 83 for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() {
84 for(p=[spots[pn],spots[pn+1]]) translate(p) children(); 84 for(p=[spots[pn],spots[pn+1]]) translate(p) children();
85 } 85 }
86 } 86 }
87 if(what=="in") { 87 if(what=="in") {
88 hulls() cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h+2*fanduct_shell); 88 hulls() cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h+2*fanduct_shell);
89 }else if(what=="out") { 89 }else if(what=="out") {
90 sh = fanduct_w; sv = fanduct_h; 90 sh = fanduct_w; sv = fanduct_h;
91 smax = max(sh,sv); 91 smax = max(sh,sv);
92 translate([0,0,fanduct_shell]) hulls() { 92 translate([0,0,fanduct_shell]) hulls() {
93 cylinder(d=fanduct_w,h=fanduct_h/2); 93 cylinder(d=fanduct_w,h=fanduct_h/2);
94 translate([0,0,fanduct_h/2]) 94 translate([0,0,fanduct_h/2])
95 scale([sh/smax,sh/smax,sv/smax]) 95 scale([sh/smax,sh/smax,sv/smax])
96 intersection() { 96 intersection() {
97 sphere(d=smax,$fn=36); 97 sphere(d=smax,$fn=36);
98 translate([0,0,-1]) 98 translate([0,0,-1])
99 cylinder(d=smax+2,h=smax+2,$fn=36); 99 cylinder(d=smax+2,h=smax+2,$fn=36);
100 } 100 }
101 } 101 }
102 } 102 }
103 } 103 }
104 104
105 if(dual) dual(); 105 if(dual) dual();
106 else single(); 106 else single();
107 } 107 }
108 108
109 // ***bumps for easier position adjustments in line with hotend 109 // ***bumps for easier position adjustments in line with hotend
110 module marks(what) { 110 module marks(what) {
111 if(what=="in") { 111 if(what=="in") {
112 for(y=[-1,1]) 112 for(y=[-1,1]) translate([0,dual?y*nozzles_apart/2:0,0])
113 hull() for(z=[0,-fanduct_shell-fanduct_h/2]) 113 hull() for(z=[0,-fanduct_shell-fanduct_h/2])
114 translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) 114 translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z])
115 rotate([90,0,0]) { 115 rotate([90,0,0]) {
116 cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); 116 cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30);
117 for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) 117 for(z=[-1,1]) translate([0,0,z*fanduct_w/2])
118 sphere(r=fanduct_shell,$fn=30); 118 sphere(r=fanduct_shell,$fn=30);
119 } 119 }
120 } 120 }
121 } 121 }
122 122
123 // ***output 123 // ***output
124 module output(what,type=type) { 124 module output(what,type=type) {
125 module guideline(xyxy) { 125 module guideline(xyxy) {
126 module pin(xy) { 126 module pin(xy) {
127 translate([xy[0],xy[1],0]) 127 translate([xy[0],xy[1],0])
128 cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); 128 cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6);
129 } 129 }
130 xyxyxy=concat(xyxy,[[0,0]]); 130 xyxyxy=concat(xyxy,[[0,0]]);
131 for(i=[0:1:len(xyxyxy)-2]) 131 for(i=[0:1:len(xyxyxy)-2])
132 hull() for(j=[i,i+1]) pin(xyxyxy[j]); 132 hull() for(j=[i,i+1]) pin(xyxyxy[j]);
133 } 133 }
134 134
135 module circus(what) { 135 module circus(what) {
136 if(what=="in") { 136 if(what=="in") {
137 difference() { 137 difference() {
138 rotate_extrude($fn=smooth_f) 138 rotate_extrude($fn=smooth_f)
139 polygon([ 139 polygon([
140 [0,-fanduct_elevation+fanduct_blowtarget+epsilon], 140 [0,-fanduct_elevation+fanduct_blowtarget+epsilon],
141 [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], 141 [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2],
142 [fanduct_ir+fanduct_shell+fanduct_w/2,0], 142 [fanduct_ir+fanduct_shell+fanduct_w/2,0],
143 [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); 143 [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]);
144 translate([0,0,-1]) 144 translate([0,0,-1])
145 cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); 145 cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f);
146 mirror([0,0,1]) 146 mirror([0,0,1])
147 translate([0,0,-epsilon]) 147 translate([0,0,-epsilon])
148 cylinder(r=fanduct_ir+2*fanduct_shell+fanduct_w+1,h=fanduct_elevation+.1+2); 148 cylinder(r=fanduct_ir+2*fanduct_shell+fanduct_w+1,h=fanduct_elevation+.1+2);
149 } 149 }
150 }else if(what=="out") { 150 }else if(what=="out") {
151 rotate_extrude($fn=smooth_f) 151 rotate_extrude($fn=smooth_f)
152 polygon([ 152 polygon([
153 [0,-fanduct_elevation+fanduct_blowtarget+epsilon], 153 [0,-fanduct_elevation+fanduct_blowtarget+epsilon],
154 [fanduct_ir+fanduct_shell+1,fanduct_h/2], 154 [fanduct_ir+fanduct_shell+1,fanduct_h/2],
155 [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell], 155 [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell],
156 [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); 156 [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]);
157 }else if(what=="airguides") { 157 }else if(what=="airguides") {
158 inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; 158 inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w;
159 union() { 159 union() {
160 for(my=[0,1]) mirror([0,my,0]) { 160 for(my=[0,1]) mirror([0,my,0]) {