summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--another.scad2
1 files changed, 1 insertions, 1 deletions
diff --git a/another.scad b/another.scad
index 2383276..55fda78 100644
--- a/another.scad
+++ b/another.scad
@@ -99,193 +99,193 @@ module the_extruder(
99 mount_depth = mount_screw_l - (ls_z+ls_h/2+min_z_shell); 99 mount_depth = mount_screw_l - (ls_z+ls_h/2+min_z_shell);
100 body_h = max(protrusion_h+bore_l,mount_screw_l-mount_depth+mount_screwhead_h+min_z_shell,ls_z*2); 100 body_h = max(protrusion_h+bore_l,mount_screw_l-mount_depth+mount_screwhead_h+min_z_shell,ls_z*2);
101 echo("mount depth",mount_depth); 101 echo("mount depth",mount_depth);
102 102
103 module teardrop(r,d,h,center=false,angle=45) { 103 module teardrop(r,d,h,center=false,angle=45) {
104 dd = d ? d : (2*r); 104 dd = d ? d : (2*r);
105 $fn = dd*fnd; 105 $fn = dd*fnd;
106 cylinder(d=dd,h=h,center=center); 106 cylinder(d=dd,h=h,center=center);
107 if(angle>0) translate([0,0,center?-h/2:0]) 107 if(angle>0) translate([0,0,center?-h/2:0])
108 rotate([0,0,angle]) 108 rotate([0,0,angle])
109 cube(size=[d/2,d/2,h]); 109 cube(size=[d/2,d/2,h]);
110 } 110 }
111 111
112 module mirrorleft() { 112 module mirrorleft() {
113 mirror([left?0:1,0,0]) children(); 113 mirror([left?0:1,0,0]) children();
114 } 114 }
115 module place_idler() { 115 module place_idler() {
116 rotate([0,0,45]) 116 rotate([0,0,45])
117 translate([(pulley_d+idler_d)/2,0,0]) 117 translate([(pulley_d+idler_d)/2,0,0])
118 children(); 118 children();
119 } 119 }
120 module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { 120 module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) {
121 if(depth) { 121 if(depth) {
122 hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); 122 hh = (-4*pow(depth,2)+pow(d,2))/(8*depth);
123 rr = depth+hh; 123 rr = depth+hh;
124 translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); 124 translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr);
125 }else if(r) { 125 }else if(r) {
126 hh=sqrt(pow(r,2)-pow(d,2)/4); 126 hh=sqrt(pow(r,2)-pow(d,2)/4);
127 translate([0,0,hh]) sphere(r=r,$fn=fnr*r); 127 translate([0,0,hh]) sphere(r=r,$fn=fnr*r);
128 } 128 }
129 } 129 }
130 130
131 % if(vitamins) mirrorleft() { 131 % if(vitamins) mirrorleft() {
132 translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); 132 translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60);
133 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) 133 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0])
134 cylinder(d=mount_screw_d,h=20,$fn=30); 134 cylinder(d=mount_screw_d,h=20,$fn=30);
135 translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); 135 translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30);
136 translate([0,0,protrusion_h]) { 136 translate([0,0,protrusion_h]) {
137 difference() { 137 difference() {
138 cylinder(d=bore_d,h=bore_l,$fn=30); 138 cylinder(d=bore_d,h=bore_l,$fn=30);
139 translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) 139 translate([-bore_d/2-1,bore_dd-bore_d/2,-1])
140 cube([bore_d+2,bore_d/2,bore_l+2]); 140 cube([bore_d+2,bore_d/2,bore_l+2]);
141 } 141 }
142 translate([0,0,pulley_elevation]) { 142 translate([0,0,pulley_elevation]) {
143 cylinder(d=pulley_d,h=pulley_h,$fn=30); 143 cylinder(d=pulley_d,h=pulley_h,$fn=30);
144 translate([0,0,teeth_elevation]) { 144 translate([0,0,teeth_elevation]) {
145 place_idler() { 145 place_idler() {
146 cylinder(d=idler_d,h=idler_h,center=true,$fn=30); 146 cylinder(d=idler_d,h=idler_h,center=true,$fn=30);
147 cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); 147 cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30);
148 }//place idler 148 }//place idler
149 // filament path 149 // filament path
150 rotate([0,0,45]) { 150 rotate([0,0,45]) {
151 translate([pulley_d/2-idler_filament_offset,0,0]) rotate([90,0,0]) { 151 translate([pulley_d/2-idler_filament_offset,0,0]) rotate([90,0,0]) {
152 cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); 152 cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15);
153 }//rotate translate 153 }//rotate translate
154 translate([pulley_d/2+filament_offset,0,0]) rotate([-90,0,0]) { 154 translate([pulley_d/2+filament_offset,0,0]) rotate([-90,0,0]) {
155 cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); 155 cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15);
156 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) 156 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d])
157 pushfit(pf); 157 pushfit(pf);
158 }//rotate translate 158 }//rotate translate
159 }//rotate 159 }//rotate
160 }//translate teeth 160 }//translate teeth
161 }//translate pulley 161 }//translate pulley
162 }//translate protrusion 162 }//translate protrusion
163 }//vitamins 163 }//vitamins
164 164
165 module lever() { 165 module lever() {
166 translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { 166 translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) {
167 difference() { 167 difference() {
168 union() { 168 union() {
169 hull() { 169 hull() {
170 place_idler() 170 place_idler()
171 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); 171 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60);
172 translate([mount_d/2,0,0]) 172 translate([mount_d/2,0,0])
173 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); 173 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60);
174 }//hull 174 }//hull
175 hull() { 175 hull() {
176 translate([mount_d/2,0,0]) 176 translate([mount_d/2,0,0])
177 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); 177 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60);
178 translate([mount_d/2,-longwing,0]) rotate([0,90,0]) 178 translate([mount_d/2,-longwing,0]) rotate([0,90,0])
179 cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); 179 cylinder(d=lever_thickness,h=lsd,center=true,$fn=60);
180 }//hull 180 }//hull
181 }//union 181 }//union
182 182
183 // filament path 183 // filament path
184 place_idler() 184 place_idler()
185 translate([-idler_d/2-idler_filament_offset,0,0]) 185 translate([-idler_d/2-idler_filament_offset,0,0])
186 rotate([90,0,0]) { 186 rotate([90,0,0]) {
187 mirror([0,1,0]) 187 mirror([0,1,0])
188 teardrop(d=filament_path_d,h=3*gearbox_d,center=true); 188 teardrop(d=filament_path_d,h=3*gearbox_d,center=true);
189 translate([0,0, 189 translate([0,0,
190 sqrt(2)*(mount_d-pulley_d+lsd)/2 190 sqrt(2)*(mount_d-pulley_d+lsd)/2
191 ]) { 191 ]) {
192 cylinder(d1=filament_path_d,d2=2*filament_path_d, 192 cylinder(d1=filament_path_d,d2=2*filament_path_d,
193 h=filament_path_d,$fn=2*filament_path_d*fnd); 193 h=filament_path_d,$fn=2*filament_path_d*fnd);
194 translate([0,0,filament_path_d-epsilon]) 194 translate([0,0,filament_path_d-epsilon])
195 cylinder(d=2*filament_path_d,h=lsd,$fn=2*filament_path_d*fnd); 195 cylinder(d=2*filament_path_d,h=lsd*sqrt(2),$fn=2*filament_path_d*fnd);
196 }//translate 196 }//translate
197 }//rotate translate place_idler 197 }//rotate translate place_idler
198 198
199 // idler space and mounting hole 199 // idler space and mounting hole
200 place_idler() { 200 place_idler() {
201 difference() { 201 difference() {
202 cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60); 202 cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60);
203 if(supports) for(y=[-lsd/2+extrusion_width:(lsd-2*extrusion_width)/3:lsd/2-extrusion_width]) 203 if(supports) for(y=[-lsd/2+extrusion_width:(lsd-2*extrusion_width)/3:lsd/2-extrusion_width])
204 translate([-lsd/2-1,y-extrusion_width/2,-idler_h/2-idler_v_tolerance/2-1]) 204 translate([-lsd/2-1,y-extrusion_width/2,-idler_h/2-idler_v_tolerance/2-1])
205 cube(size=[lsd+2,extrusion_width,idler_h+idler_v_tolerance+2]); 205 cube(size=[lsd+2,extrusion_width,idler_h+idler_v_tolerance+2]);
206 } 206 }
207 cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); 207 cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30);
208 translate([0,0,lever_thickness/2-idler_screwhead_h]) 208 translate([0,0,lever_thickness/2-idler_screwhead_h])
209 cylinder(d=idler_screwhead_d,h=idler_screwhead_h+1,$fn=fnd*idler_screwhead_d); 209 cylinder(d=idler_screwhead_d,h=idler_screwhead_h+1,$fn=fnd*idler_screwhead_d);
210 } 210 }
211 // mounting screw hole 211 // mounting screw hole
212 translate([mount_d/2,0,0]) 212 translate([mount_d/2,0,0])
213 cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d); 213 cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d);
214 214
215 // lever end 215 // lever end
216 translate([mount_d/2,0,0]) rotate([0,90,0]) { 216 translate([mount_d/2,0,0]) rotate([0,90,0]) {
217 translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); 217 translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15);
218 translate([0,-longwing,0]) 218 translate([0,-longwing,0])
219 mirror([0,0,1]) 219 mirror([0,0,1])
220 difference() { 220 difference() {
221 cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance)); 221 cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance));
222 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 222 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
223 } 223 }
224 }//rotate-translate 224 }//rotate-translate
225 }//difference 225 }//difference
226 // bridging patch 226 // bridging patch
227 if(bridges) place_idler() 227 if(bridges) place_idler()
228 translate([0,0,lever_thickness/2-mount_screwhead_h]) 228 translate([0,0,lever_thickness/2-mount_screwhead_h])
229 mirror([0,0,1]) 229 mirror([0,0,1])
230 cylinder(d=mount_screwhead_d,h=layer_height); 230 cylinder(d=mount_screwhead_d,h=layer_height);
231 }//translate 231 }//translate
232 }//lever module 232 }//lever module
233 233
234 module body() { 234 module body() {
235 difference() { 235 difference() {
236 union() { 236 union() {
237 cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); 237 cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d);
238 // spring tensioner part 238 // spring tensioner part
239 translate([-gearbox_d/2,0,0]) hull() { 239 translate([-gearbox_d/2,0,0]) hull() {
240 translate([0,-longwing,ls_z]) 240 translate([0,-longwing,ls_z])
241 rotate([0,90,0]) 241 rotate([0,90,0])
242 cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); 242 cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness);
243 hh=body_h-ls_z; 243 hh=body_h-ls_z;
244 translate([0,0,ls_z]) 244 translate([0,0,ls_z])
245 mirror([0,1,0]) cube(size=[fsw,longwing+(st_thinshell+st_split_w_tolerance)/2+st_thickshell,body_h-ls_z]); 245 mirror([0,1,0]) cube(size=[fsw,longwing+(st_thinshell+st_split_w_tolerance)/2+st_thickshell,body_h-ls_z]);
246 hhh=ls_z; 246 hhh=ls_z;
247 translate([0,0,0]) 247 translate([0,0,0])
248 mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); 248 mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]);
249 }//hull translate 249 }//hull translate
250 250
251 // pushfit bracket 251 // pushfit bracket
252 translate([0,0,filament_elevation]) 252 translate([0,0,filament_elevation])
253 rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) 253 rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0])
254 rotate([-90,0,0]) 254 rotate([-90,0,0])
255 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { 255 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) {
256 pfbl = pf_h(pf)+gearbox_d/2; //TODO: 256 pfbl = pf_h(pf)+gearbox_d/2; //TODO:
257 if(pf_smooth) { 257 if(pf_smooth) {
258 pfbd = pf_d(pf)+2*pf_shell; 258 pfbd = pf_d(pf)+2*pf_shell;
259 hull() { 259 hull() {
260 cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); 260 cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd);
261 translate([-epsilon/2,0,0]) { 261 translate([-epsilon/2,0,0]) {
262 cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); 262 cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]);
263 mirror([0,1,0]) 263 mirror([0,1,0])
264 cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); 264 cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]);
265 }//translate 265 }//translate
266 }//hull 266 }//hull
267 }else{ 267 }else{
268 pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; 268 pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2;
269 pfbd = pfb2a/cos(30); 269 pfbd = pfb2a/cos(30);
270 pfbs = pfb2a*tan(30); 270 pfbs = pfb2a*tan(30);
271 cylinder(d=pfbd,h=pfbl,$fn=6); 271 cylinder(d=pfbd,h=pfbl,$fn=6);
272 translate([-pfbs/2,0,0]) { 272 translate([-pfbs/2,0,0]) {
273 hull() { 273 hull() {
274 translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); 274 translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]);
275 cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); 275 cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]);
276 mirror([0,1,0]) 276 mirror([0,1,0])
277 cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); 277 cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]);
278 }//hull 278 }//hull
279 }//translate*/ 279 }//translate*/
280 }//if(pf_smooth) 280 }//if(pf_smooth)
281 }//translate rotate translate rotate translate 281 }//translate rotate translate rotate translate
282 }//union (first child of difference) 282 }//union (first child of difference)
283 283
284 // protrusion 284 // protrusion
285 translate([0,0,-1]) 285 translate([0,0,-1])
286 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); 286 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h));
287 // mount screw holes 287 // mount screw holes
288 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { 288 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) {
289 translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)]) 289 translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)])
290 mirror([0,0,1]) 290 mirror([0,0,1])
291 cylinder(d=mount_screw_d+mount_screw_d_tolerance, 291 cylinder(d=mount_screw_d+mount_screw_d_tolerance,