summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2018-08-12 00:54:08 (UTC)
committer Michael Krelin <hacker@klever.net>2018-08-12 00:54:08 (UTC)
commit6c61457ea7bfaf0edc28f9e771bf608e2a9bc405 (patch) (unidiff)
tree4583dad3add8dd4c1c00ab31ef7a1f498c1a8196
parent84832958278728643334a327bc3a2783ad354d72 (diff)
downloadextrudery-6c61457ea7bfaf0edc28f9e771bf608e2a9bc405.zip
extrudery-6c61457ea7bfaf0edc28f9e771bf608e2a9bc405.tar.gz
extrudery-6c61457ea7bfaf0edc28f9e771bf608e2a9bc405.tar.bz2
more generous back side cutout
just wanted a wider opening in there, but I'm not entirely pleased with the resulting code, though given the late hour I'll leave with it. Maybe until I revert this commit or rework that part altogether.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad23
1 files changed, 16 insertions, 7 deletions
diff --git a/another.scad b/another.scad
index f54c5cd..b80d0d0 100644
--- a/another.scad
+++ b/another.scad
@@ -261,140 +261,149 @@ module the_extruder(
261 }//translate 261 }//translate
262 }//hull 262 }//hull
263 }else{ 263 }else{
264 pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; 264 pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2;
265 pfbd = pfb2a/cos(30); 265 pfbd = pfb2a/cos(30);
266 pfbs = pfb2a*tan(30); 266 pfbs = pfb2a*tan(30);
267 cylinder(d=pfbd,h=pfbl,$fn=6); 267 cylinder(d=pfbd,h=pfbl,$fn=6);
268 translate([-pfbs/2,0,0]) { 268 translate([-pfbs/2,0,0]) {
269 hull() { 269 hull() {
270 translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); 270 translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]);
271 cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); 271 cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]);
272 mirror([0,1,0]) 272 mirror([0,1,0])
273 cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); 273 cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]);
274 }//hull 274 }//hull
275 }//translate*/ 275 }//translate*/
276 }//if(pf_smooth) 276 }//if(pf_smooth)
277 }//translate rotate translate rotate translate 277 }//translate rotate translate rotate translate
278 }//union (first child of difference) 278 }//union (first child of difference)
279 279
280 // protrusion 280 // protrusion
281 translate([0,0,-1]) 281 translate([0,0,-1])
282 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); 282 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h));
283 // mount screw holes 283 // mount screw holes
284 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { 284 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) {
285 translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)]) 285 translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)])
286 mirror([0,0,1]) 286 mirror([0,0,1])
287 cylinder(d=mount_screw_d+mount_screw_d_tolerance, 287 cylinder(d=mount_screw_d+mount_screw_d_tolerance,
288 h=mount_screw_l-mounthole_depth/2+1, 288 h=mount_screw_l-mounthole_depth/2+1,
289 $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); 289 $fn=fnd*(mount_screw_d+mount_screw_d_tolerance));
290 translate([0,0,mount_screw_l-mounthole_depth/2]) 290 translate([0,0,mount_screw_l-mounthole_depth/2])
291 cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); 291 cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d);
292 }//for 292 }//for
293 // pushfit 293 // pushfit
294 translate([0,0,filament_elevation]) 294 translate([0,0,filament_elevation])
295 rotate([0,0,45]) translate([pulley_d/2,0,0]) 295 rotate([0,0,45]) translate([pulley_d/2,0,0])
296 rotate([-90,0,0]) 296 rotate([-90,0,0])
297 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) 297 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon])
298 rotate([0,0,180]) { 298 rotate([0,0,180]) {
299 pushfit(pf); 299 pushfit(pf);
300 cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); 300 cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d);
301 translate([0,-filament_guide_d/2/sqrt(2),0]) 301 translate([0,-filament_guide_d/2/sqrt(2),0])
302 rotate([0,0,45]) 302 rotate([0,0,45])
303 cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); 303 cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true);
304 }//rotate translate rotate translate rotate translate 304 }//rotate translate rotate translate rotate translate
305 // pulley 305 // pulley
306 cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); 306 cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance));
307 // leverspace 307 // leverspace
308 hull() for(x=[0,gearbox_d]) 308 hull() for(x=[0,gearbox_d])
309 rotate([0,0,45]) 309 rotate([0,0,45])
310 translate([x,0,ls_z-ls_h/2]) 310 translate([x,0,ls_z-ls_h/2])
311 cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); 311 cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance));
312 312
313 // idler clearance 313 // idler clearance
314 a=cos(45)*(pulley_d+idler_d)/2; 314 a=cos(45)*(pulley_d+idler_d)/2;
315 b=mount_d/2-a; 315 b=mount_d/2-a;
316 x=sqrt(pow(a,2)+pow(b,2)); 316 x=sqrt(pow(a,2)+pow(b,2));
317 translate([mount_d/2,0,ls_z]) 317 translate([mount_d/2,0,ls_z])
318 intersection() { 318 intersection() {
319 r = x+idler_d/2+idler_clearance; 319 r = x+idler_d/2+idler_clearance;
320 cylinder(r=r,h=ls_h,center=true); 320 cylinder(r=r,h=ls_h,center=true);
321 translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); 321 translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]);
322 } 322 }
323 323
324 // back side cutout 324 // back side cutout
325 a0 = asin((mount_screwhead_d+2*extrusion_width)/mount_d); 325 // XXX: this is somewhat ugly and potentially bugged,
326 // but I want to sleep.
327 a0_ = atan(
328 (mount_d/sqrt(2)/2+mount_screw_d+pf_h(pf)+gearbox_d/2)
329 /
330 (
331 pulley_d/2-
332 (pf_d(pf)+2*pf_shell)/2/cos(30)
333 )
334 );
335 a0 = -135 + ( (a0_>0) ? a0_ : 180+a0_ );
326 a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); 336 a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2));
327 translate([0,0,ls_z]) hull() { 337 translate([0,0,ls_z]) difference() {
328 rotate([0,0,-180+a0]) 338 rotate([0,0,-180+a0])
329 rotate_extrude(angle=a1-a0) 339 rotate_extrude(angle=a1-a0)
330 translate([0,-ls_h/2]) 340 translate([0,-ls_h/2])
331 square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, 341 square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1,
332 ls_h]); 342 ls_h]);
333 cylinder(d=bore_d/2/*TODO:recalculate angles based on this, 343 translate([-mount_d/2,0,0])
334 too lazy to do that now*/, 344 cylinder(d=gearbox_d-mount_d,h=ls_h+2,center=true,$fn=fnd*(gearbox_d-mount_d));
335 h=ls_h,center=true); 345 }//difference translate
336 }
337 346
338 rotate([0,0,-45]) 347 rotate([0,0,-45])
339 translate([0,0,ls_z-ls_h/2]) 348 translate([0,0,ls_z-ls_h/2])
340 cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]); 349 cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]);
341 translate([0,0,ls_z-ls_h/2]) { 350 translate([0,0,ls_z-ls_h/2]) {
342 translate([mount_screwhead_d/2,0,0]) 351 translate([mount_screwhead_d/2,0,0])
343 mirror([0,1,0]) 352 mirror([0,1,0])
344 cube(size=[gearbox_d,gearbox_d/2+1,lever_thickness+lever_v_clearance]); 353 cube(size=[gearbox_d,gearbox_d/2+1,lever_thickness+lever_v_clearance]);
345 } 354 }
346 //translate([-mount_d/2,-longwing,filament_elevation]) 355 //translate([-mount_d/2,-longwing,filament_elevation])
347 if(!tensioner) /* XXX: this seems to be bullshit, but it's so old, that it's historical bullshit */ 356 if(!tensioner) /* XXX: this seems to be bullshit, but it's so old, that it's historical bullshit */
348 translate([mount_d/2,-longwing,filament_elevation]) 357 translate([mount_d/2,-longwing,filament_elevation])
349 rotate([0,-90,0]) difference() { 358 rotate([0,-90,0]) difference() {
350 cylinder(d=spring_d+spring_d_clearance,h=spring_lc+spring_dl,$fn=fnd*(spring_d+spring_d_clearance)); 359 cylinder(d=spring_d+spring_d_clearance,h=spring_lc+spring_dl,$fn=fnd*(spring_d+spring_d_clearance));
351 translate([0,0,spring_lc+spring_dl]) sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 360 translate([0,0,spring_lc+spring_dl]) sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
352 } 361 }
353 362
354 }//difference 363 }//difference
355 364
356 if(supports) intersection() { 365 if(supports) intersection() {
357 difference() { 366 difference() {
358 translate([0,0,ls_z-ls_h/2-epsilon]) 367 translate([0,0,ls_z-ls_h/2-epsilon])
359 cylinder(d=gearbox_d,h=ls_h+2*epsilon,$fn=fnd*gearbox_d); 368 cylinder(d=gearbox_d,h=ls_h+2*epsilon,$fn=fnd*gearbox_d);
360 cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); 369 cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance));
361 } 370 }
362 // supports 371 // supports
363 // TODO: hardcoded stuff below… 372 // TODO: hardcoded stuff below…
364 if(false) { // parallel 373 if(false) { // parallel
365 for(y=[-gearbox_d:4:gearbox_d]) 374 for(y=[-gearbox_d:4:gearbox_d])
366 translate([0,y-extrusion_width/2,0]) 375 translate([0,y-extrusion_width/2,0])
367 cube(size=[gearbox_d,extrusion_width,body_h]); 376 cube(size=[gearbox_d,extrusion_width,body_h]);
368 }else{ // radial 377 }else{ // radial
369 for(zr=[-65:(65+50)/7:50]) 378 for(zr=[-65:(65+50)/7:50])
370 rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) 379 rotate([0,0,zr]) translate([0,-extrusion_width/2,0])
371 cube(size=[gearbox_d,extrusion_width,body_h]); 380 cube(size=[gearbox_d,extrusion_width,body_h]);
372 } 381 }
373 } 382 }
374 383
375 }//body module 384 }//body module
376 385
377 module springpad() { 386 module springpad() {
378 smalld=st_screw_d+st_screw_d_tolerance+2*extrusion_width; 387 smalld=st_screw_d+st_screw_d_tolerance+2*extrusion_width;
379 bigd = spring_d+spring_d_clearance/2; 388 bigd = spring_d+spring_d_clearance/2;
380 hf = (bigd-smalld)/2; 389 hf = (bigd-smalld)/2;
381 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation]) 390 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation])
382 rotate([0,90,0]) difference() { 391 rotate([0,90,0]) difference() {
383 union() { 392 union() {
384 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); 393 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd);
385 translate([0,0,hf-epsilon]) 394 translate([0,0,hf-epsilon])
386 cylinder(d=bigd,h=hf*2,$fn=fnd*bigd); 395 cylinder(d=bigd,h=hf*2,$fn=fnd*bigd);
387 translate([0,0,3*hf]) 396 translate([0,0,3*hf])
388 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 397 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
389 } 398 }
390 translate([0,0,-epsilon]) 399 translate([0,0,-epsilon])
391 cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); 400 cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance));
392 } 401 }
393 } 402 }
394 403
395 module knob() { 404 module knob() {
396 ch = knob_indent_d/2; 405 ch = knob_indent_d/2;
397 translate([0,0,body_h+epsilon]) { 406 translate([0,0,body_h+epsilon]) {
398 mirror([0,0,1]) translate([0,0,-epsilon]) { 407 mirror([0,0,1]) translate([0,0,-epsilon]) {
399 difference() { 408 difference() {
400 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d); 409 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d);