summaryrefslogtreecommitdiff
path: root/another.scad
Unidiff
Diffstat (limited to 'another.scad') (more/less context) (show whitespace changes)
-rw-r--r--another.scad4
1 files changed, 2 insertions, 2 deletions
diff --git a/another.scad b/another.scad
index 1c6d836..0d67286 100644
--- a/another.scad
+++ b/another.scad
@@ -333,162 +333,162 @@ module the_extruder(
333 translate([0,0,ls_z]) difference() { 333 translate([0,0,ls_z]) difference() {
334 rotate([0,0,-180+a0]) 334 rotate([0,0,-180+a0])
335 rotate_extrude(angle=a1-a0) 335 rotate_extrude(angle=a1-a0)
336 translate([0,-ls_h/2]) 336 translate([0,-ls_h/2])
337 square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, 337 square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1,
338 ls_h]); 338 ls_h]);
339 translate([-mount_d/2,0,0]) 339 translate([-mount_d/2,0,0])
340 cylinder(d=gearbox_d-mount_d,h=ls_h+2,center=true,$fn=fnd*(gearbox_d-mount_d)); 340 cylinder(d=gearbox_d-mount_d,h=ls_h+2,center=true,$fn=fnd*(gearbox_d-mount_d));
341 }//difference translate 341 }//difference translate
342 342
343 // spring tensioner 343 // spring tensioner
344 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) { 344 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) {
345 mirror([0,0,1]) { 345 mirror([0,0,1]) {
346 translate([0,0,st_thickshell]) 346 translate([0,0,st_thickshell])
347 hull() for(o=[0,spring_d]) translate([0,-o,0]) 347 hull() for(o=[0,spring_d]) translate([0,-o,0])
348 rotate([0,0,30]) 348 rotate([0,0,30])
349 cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6); 349 cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6);
350 translate([0,0,-1]) cylinder(d=st_screw_d+st_screw_d_tolerance,h=fsw+2,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); 350 translate([0,0,-1]) cylinder(d=st_screw_d+st_screw_d_tolerance,h=fsw+2,$fn=fnd*(st_screw_d+st_screw_d_tolerance));
351 bigd = spring_d+spring_d_clearance; 351 bigd = spring_d+spring_d_clearance;
352 hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; 352 hf = (bigd-st_screw_d-st_screw_d_tolerance)/2;
353 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) { 353 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) {
354 cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, 354 cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd,
355 h=hf+epsilon, $fn=fnd*bigd); 355 h=hf+epsilon, $fn=fnd*bigd);
356 translate([0,-(st_split_w+st_split_w_tolerance)/2,0]) 356 translate([0,-(st_split_w+st_split_w_tolerance)/2,0])
357 cube(size=[body_h-ls_z+1,st_split_w+st_split_w_tolerance,fsw+1]); 357 cube(size=[body_h-ls_z+1,st_split_w+st_split_w_tolerance,fsw+1]);
358 }//translate 358 }//translate
359 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) 359 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon])
360 cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); 360 cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd);
361 }//mirror 361 }//mirror
362 }//translate 362 }//translate
363 363
364 // label 364 // label
365 body_label(); 365 body_label();
366 366
367 }//difference 367 }//difference
368 368
369 }//body module 369 }//body module
370 module body_label() { 370 module body_label() {
371 if(body_label) { 371 if(body_label) {
372 label=body_label; 372 label=body_label;
373 label_thickness=body_label_thickness; 373 label_thickness=body_label_thickness;
374 label_len = len(label); 374 label_len = len(label);
375 labelspace = [gearbox_d/2-mount_screwhead_d/2-min_xy_shell,longwing-(mount_screwhead_d-st_split_w-st_split_w_tolerance)/2-2*min_xy_shell]; 375 labelspace = [gearbox_d/2-mount_screwhead_d/2-min_xy_shell,longwing-(mount_screwhead_d-st_split_w-st_split_w_tolerance)/2-2*min_xy_shell];
376 translate([0,0,body_h-label_thickness]) 376 translate([0,0,body_h-label_thickness])
377 linear_extrude(height=label_thickness+epsilon,convexity=64) 377 linear_extrude(height=label_thickness+epsilon,convexity=64)
378 translate([-mount_screwhead_d/2-min_xy_shell-labelspace.x/2,-longwing+(st_split_w+st_split_w_tolerance)/2+min_xy_shell+labelspace.y/2]) 378 translate([-mount_screwhead_d/2-min_xy_shell-labelspace.x/2,-longwing+(st_split_w+st_split_w_tolerance)/2+min_xy_shell+labelspace.y/2])
379 mirror([left?0:1,0]) 379 mirror([left?0:1,0])
380 text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black"); 380 text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black");
381 }//if(body_label) 381 }else sphere(d=epsilon); // to avoid makefile breakage
382 } 382 }
383 383
384 module springpad() { 384 module springpad() {
385 smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell; 385 smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell;
386 bigd = spring_d+spring_d_clearance/2; 386 bigd = spring_d+spring_d_clearance/2;
387 hf = (bigd-smalld)/2; 387 hf = (bigd-smalld)/2;
388 h = hf*3.5; 388 h = hf*3.5;
389 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation]) 389 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation])
390 rotate([0,90,0]) difference() { 390 rotate([0,90,0]) difference() {
391 union() { 391 union() {
392 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); 392 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd);
393 translate([0,0,hf-epsilon]) 393 translate([0,0,hf-epsilon])
394 cylinder(d=bigd,h=h-hf,$fn=fnd*bigd); 394 cylinder(d=bigd,h=h-hf,$fn=fnd*bigd);
395 translate([0,0,h]) 395 translate([0,0,h])
396 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 396 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
397 l = body_h-ls_z; 397 l = body_h-ls_z;
398 w = st_split_w; 398 w = st_split_w;
399 hull() translate([0,-st_split_w/2,0]) mirror([1,0,0]) { 399 hull() translate([0,-st_split_w/2,0]) mirror([1,0,0]) {
400 translate([0,0,w]) 400 translate([0,0,w])
401 cube(size=[l,st_split_w,w]); 401 cube(size=[l,st_split_w,w]);
402 cube(size=[l-w,st_split_w,2*w]); 402 cube(size=[l-w,st_split_w,2*w]);
403 } 403 }
404 } 404 }
405 translate([0,0,-epsilon]) 405 translate([0,0,-epsilon])
406 cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); 406 cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance));
407 } 407 }
408 } 408 }
409 409
410 module knob() { 410 module knob() {
411 ch = knob_indent_d/2; 411 ch = knob_indent_d/2;
412 knob_bore_l = body_h-protrusion_h-pulley_elevation-pulley_h-knob_v_clearance; 412 knob_bore_l = body_h-protrusion_h-pulley_elevation-pulley_h-knob_v_clearance;
413 translate([0,0,body_h+epsilon]) { 413 translate([0,0,body_h+epsilon]) {
414 mirror([0,0,1]) translate([0,0,-epsilon]) { 414 mirror([0,0,1]) translate([0,0,-epsilon]) {
415 difference() { 415 difference() {
416 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d); 416 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d);
417 translate([0,0,-1]) difference() { 417 translate([0,0,-1]) difference() {
418 cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2); 418 cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2);
419 translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1]) 419 translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1])
420 cube([bore_d+2,bore_d/2,knob_bore_l+4]); 420 cube([bore_d+2,bore_d/2,knob_bore_l+4]);
421 } 421 }
422 } 422 }
423 } 423 }
424 difference() { 424 difference() {
425 hull() { 425 hull() {
426 cylinder(d=gearbox_d-2*ch,h=knob_h,$fn=fnd*gearbox_d); 426 cylinder(d=gearbox_d-2*ch,h=knob_h,$fn=fnd*gearbox_d);
427 translate([0,0,ch]) 427 translate([0,0,ch])
428 cylinder(d=gearbox_d,h=knob_h-2*ch,$fn=fnd*gearbox_d); 428 cylinder(d=gearbox_d,h=knob_h-2*ch,$fn=fnd*gearbox_d);
429 } 429 }
430 for(a=[0:360/knob_indents:359]) rotate([0,0,a]) 430 for(a=[0:360/knob_indents:359]) rotate([0,0,a])
431 translate([0,gearbox_d/2,-1]) 431 translate([0,gearbox_d/2,-1])
432 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d); 432 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d);
433 translate([0,0,-body_h-epsilon]) knob_label(); 433 translate([0,0,-body_h-epsilon]) knob_label();
434 } 434 }
435 } 435 }
436 }//knob module 436 }//knob module
437 module knob_label() { 437 module knob_label() {
438 if(knob_label) { 438 if(knob_label) {
439 ll = len(knob_label); 439 ll = len(knob_label);
440 lsl = gearbox_d-knob_indent_d; 440 lsl = gearbox_d-knob_indent_d;
441 ts = knob_label_size?knob_label_size:min(lsl/ll,gearbox_d/4); 441 ts = knob_label_size?knob_label_size:min(lsl/ll,gearbox_d/4);
442 translate([0,0,body_h+epsilon+knob_h-knob_label_thickness]) 442 translate([0,0,body_h+epsilon+knob_h-knob_label_thickness])
443 linear_extrude(height=knob_label_thickness+epsilon,convexity=64) 443 linear_extrude(height=knob_label_thickness+epsilon,convexity=64)
444 mirror([left?0:1,0]) 444 mirror([left?0:1,0])
445 text(text=knob_label,size=ts,halign="center",valign="center",font="Arial Black"); 445 text(text=knob_label,size=ts,halign="center",valign="center",font="Arial Black");
446 } 446 }else sphere(d=epsilon); // to avoid makefile breakage
447 } 447 }
448 448
449 module debug() { 449 module debug() {
450 difference() { 450 difference() {
451 children(); 451 children();
452 if(debug) { 452 if(debug) {
453 // spring tensioner debug cutout 453 // spring tensioner debug cutout
454 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) 454 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0])
455 translate([0,-lever_thickness/2-1,-gearbox_d]) 455 translate([0,-lever_thickness/2-1,-gearbox_d])
456 cube(size=[body_h/2+1,lever_thickness/2+1,gearbox_d+2]); 456 cube(size=[body_h/2+1,lever_thickness/2+1,gearbox_d+2]);
457 // lever axis debug cutout 457 // lever axis debug cutout
458 translate([mount_d/2,0,-1]) 458 translate([mount_d/2,0,-1])
459 rotate([0,0,-45]) 459 rotate([0,0,-45])
460 cube(size=[gearbox_d-mount_d,gearbox_d-mount_d,body_h+knob_h+2]); 460 cube(size=[gearbox_d-mount_d,gearbox_d-mount_d,body_h+knob_h+2]);
461 // idler debug cutout 461 // idler debug cutout
462 translate([0,0,ls_z]) 462 translate([0,0,ls_z])
463 place_idler() 463 place_idler()
464 rotate([0,0,-45]) 464 rotate([0,0,-45])
465 translate([0,0,-lever_thickness/2-epsilon]) 465 translate([0,0,-lever_thickness/2-epsilon])
466 cube(size=[lsd*sqrt(2)/2+1,lsd*sqrt(2)/2+1, 466 cube(size=[lsd*sqrt(2)/2+1,lsd*sqrt(2)/2+1,
467 lever_thickness+2*epsilon]); 467 lever_thickness+2*epsilon]);
468 // pushfit debug cutout 468 // pushfit debug cutout
469 place_idler() 469 place_idler()
470 translate([-idler_d/2+filament_offset,0,ls_z]) 470 translate([-idler_d/2+filament_offset,0,ls_z])
471 cube(size=[gearbox_d/2,gearbox_d/2+pf_h(pf),body_h-ls_z+knob_h+1]); 471 cube(size=[gearbox_d/2,gearbox_d/2+pf_h(pf),body_h-ls_z+knob_h+1]);
472 }//if debug 472 }//if debug
473 }//difference 473 }//difference
474 } 474 }
475 475
476 mirrorleft() 476 mirrorleft()
477 debug() 477 debug()
478 if(what=="lever") color("green",0.7) lever(); 478 if(what=="lever") color("green",0.7) lever();
479 else if(what=="body") color("yellow",0.7) body(); 479 else if(what=="body") color("yellow",0.7) body();
480 else if(what=="body.label") color("brown",0.7) body_label(); 480 else if(what=="body.label") color("brown",0.7) body_label();
481 else if(what=="knob") color("red",0.7) knob(); 481 else if(what=="knob") color("red",0.7) knob();
482 else if(what=="knob.label") color("brown",0.7) knob_label(); 482 else if(what=="knob.label") color("brown",0.7) knob_label();
483 else if(what=="springpad") color("blue",0.7) springpad(); 483 else if(what=="springpad") color("blue",0.7) springpad();
484 else if(what=="both") { 484 else if(what=="both") {
485 color("green",0.7) lever(); 485 color("green",0.7) lever();
486 color("yellow",0.7) body(); 486 color("yellow",0.7) body();
487 color("brown",0.7) body_label(); 487 color("brown",0.7) body_label();
488 }else{ 488 }else{
489 color("green",0.7) lever(); 489 color("green",0.7) lever();
490 color("yellow",0.7) body(); 490 color("yellow",0.7) body();
491 color("brown",0.7) body_label(); 491 color("brown",0.7) body_label();
492 color("red",0.7) knob(); 492 color("red",0.7) knob();
493 color("brown",0.7) knob_label(); 493 color("brown",0.7) knob_label();
494 color("blue",0.7) springpad(); 494 color("blue",0.7) springpad();