summaryrefslogtreecommitdiff
path: root/another.scad
Unidiff
Diffstat (limited to 'another.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad3
1 files changed, 2 insertions, 1 deletions
diff --git a/another.scad b/another.scad
index e4d79f9..915b184 100644
--- a/another.scad
+++ b/another.scad
@@ -1,82 +1,82 @@
1draft=true; 1draft=true;
2layer_height=0.2; extrusion_width=0.4; 2layer_height=0.2; extrusion_width=0.4;
3epsilon=0.01; 3epsilon=0.01;
4$fs=0.0125; 4$fs=0.0125;
5 5
6use <pushfittery.scad>; 6use <pushfittery.scad>;
7include <pushfit_data.scad>; 7include <pushfit_data.scad>;
8include <pulley_data.scad>; 8include <pulley_data.scad>;
9 9
10module the_extruder( 10module the_extruder(
11 // motor properties 11 // motor properties
12 gearbox_d = 36, 12 gearbox_d = 36,
13 mount_d = 28, // the distance between opposite mounting holes 13 mount_d = 28, // the distance between opposite mounting holes
14 mounthole_depth = 5, 14 mounthole_depth = 5,
15 mounthole_min_depth = 3, mounthole_max_depth = 4, 15 mounthole_min_depth = 3, mounthole_max_depth = 4,
16 protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox 16 protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox
17 bore_d = 8, bore_l = 17.6, 17 bore_d = 8, bore_l = 17.6,
18 bore_dd = 7, 18 bore_dd = 7,
19 // pulley properties 19 // pulley properties
20 pulley = pulley_e3d, 20 pulley = pulley_e3d,
21 pulley_elevation = 1, // pulley elevation above the protrusion 21 pulley_elevation = 1, // pulley elevation above the protrusion
22 // idler properties 22 // idler properties
23 idler_d = 10, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height 23 idler_d = 10, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height
24 // spring properties 24 // spring properties
25 spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length 25 spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length
26 // filament path properties 26 // filament path properties
27 filament_d = 1.75, 27 filament_d = 1.75,
28 filament_path_d = 2, 28 filament_path_d = 2,
29 filament_guide_d = 4, // PTFE filament guide diameter 29 filament_guide_d = 4, // PTFE filament guide diameter
30 // knob properties 30 // knob properties
31 knob_h = 10, 31 knob_h = 10,
32 knob_bore_l = 4,
33 knob_indent_d = 4, 32 knob_indent_d = 4,
34 knob_indents = 12, 33 knob_indents = 12,
34 knob_v_clearance = 1,
35 // spring tensioner 35 // spring tensioner
36 st_nut_d = 9, st_nut_h = 4, 36 st_nut_d = 9, st_nut_h = 4,
37 st_screw_d = 5, 37 st_screw_d = 5,
38 st_thickshell = 8*extrusion_width, st_thinshell = 2*extrusion_width, 38 st_thickshell = 8*extrusion_width, st_thinshell = 2*extrusion_width,
39 st_split_w = 4*extrusion_width, 39 st_split_w = 4*extrusion_width,
40 40
41 // screw it 41 // screw it
42 mount_screw_d = 3.1, mount_screw_l = 20, 42 mount_screw_d = 3.1, mount_screw_l = 20,
43 mount_screwhead_d=6, mount_screwhead_h=3, 43 mount_screwhead_d=6, mount_screwhead_h=3,
44 idler_screw_d = 3, 44 idler_screw_d = 3,
45 idler_screwhead_d=6, idler_screwhead_h=3, 45 idler_screwhead_d=6, idler_screwhead_h=3,
46 46
47 pf = pushfit_metal, 47 pf = pushfit_metal,
48 pf_shell = max(3*layer_height,3*extrusion_width), 48 pf_shell = max(3*layer_height,3*extrusion_width),
49 49
50 // empty spaces 50 // empty spaces
51 idler_travel = 3, // how far should idler travel when pressed 51 idler_travel = 3, // how far should idler travel when pressed
52 idler_clearance=.5, 52 idler_clearance=.5,
53 pulley_small_d_clearance=.5, 53 pulley_small_d_clearance=.5,
54 lever_v_clearance=.7, // vertical clearance for the lever 54 lever_v_clearance=.7, // vertical clearance for the lever
55 spring_d_clearance=1, 55 spring_d_clearance=1,
56 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion 56 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion
57 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion 57 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion
58 mount_screw_d_tolerance=.4, 58 mount_screw_d_tolerance=.4,
59 idler_v_tolerance=.5, 59 idler_v_tolerance=.5,
60 knob_bore_d_tolerance=.6, 60 knob_bore_d_tolerance=.6,
61 st_nut_h_tolerance=.2, 61 st_nut_h_tolerance=.2,
62 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ 62 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */
63 st_screw_d_tolerance=.5, 63 st_screw_d_tolerance=.5,
64 st_split_w_tolerance = .3, 64 st_split_w_tolerance = .3,
65 65
66 min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis. 66 min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis.
67 min_xy_shell = 2*extrusion_width, 67 min_xy_shell = 2*extrusion_width,
68 68
69 body_label = "another", body_label_thickness = layer_height, 69 body_label = "another", body_label_thickness = layer_height,
70 70
71 what="lever", // lever|body|knob|springpad|* 71 what="lever", // lever|body|knob|springpad|*
72 left=false, 72 left=false,
73 vitamins = true, 73 vitamins = true,
74 bridges = true, 74 bridges = true,
75 debug = false, 75 debug = false,
76) { 76) {
77 fnd = 2*PI; fnr = 2*fnd; 77 fnd = 2*PI; fnr = 2*fnd;
78 function lu(m,k) = m[search([k],m)[0]][1]; 78 function lu(m,k) = m[search([k],m)[0]][1];
79 79
80 pulley_d = lu(pulley,"d"); 80 pulley_d = lu(pulley,"d");
81 pulley_h = lu(pulley,"h"); 81 pulley_h = lu(pulley,"h");
82 teeth_elevation = lu(pulley,"fe"); 82 teeth_elevation = lu(pulley,"fe");
@@ -363,96 +363,97 @@ module the_extruder(
363 // label 363 // label
364 body_label(); 364 body_label();
365 365
366 }//difference 366 }//difference
367 367
368 }//body module 368 }//body module
369 module body_label() { 369 module body_label() {
370 if(body_label) { 370 if(body_label) {
371 label=body_label; 371 label=body_label;
372 label_thickness=body_label_thickness; 372 label_thickness=body_label_thickness;
373 label_len = len(label); 373 label_len = len(label);
374 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]; 374 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 translate([0,0,body_h-label_thickness]) 375 translate([0,0,body_h-label_thickness])
376 linear_extrude(height=label_thickness+epsilon,convexity=64) 376 linear_extrude(height=label_thickness+epsilon,convexity=64)
377 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]) 377 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 mirror([left?0:1,0]) 378 mirror([left?0:1,0])
379 text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black"); 379 text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black");
380 }//if(body_label) 380 }//if(body_label)
381 } 381 }
382 382
383 module springpad() { 383 module springpad() {
384 smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell; 384 smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell;
385 bigd = spring_d+spring_d_clearance/2; 385 bigd = spring_d+spring_d_clearance/2;
386 hf = (bigd-smalld)/2; 386 hf = (bigd-smalld)/2;
387 h = hf*3.5; 387 h = hf*3.5;
388 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation]) 388 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation])
389 rotate([0,90,0]) difference() { 389 rotate([0,90,0]) difference() {
390 union() { 390 union() {
391 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); 391 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd);
392 translate([0,0,hf-epsilon]) 392 translate([0,0,hf-epsilon])
393 cylinder(d=bigd,h=h-hf,$fn=fnd*bigd); 393 cylinder(d=bigd,h=h-hf,$fn=fnd*bigd);
394 translate([0,0,h]) 394 translate([0,0,h])
395 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 395 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
396 l = body_h-ls_z; 396 l = body_h-ls_z;
397 w = st_split_w; 397 w = st_split_w;
398 hull() translate([0,-st_split_w/2,0]) mirror([1,0,0]) { 398 hull() translate([0,-st_split_w/2,0]) mirror([1,0,0]) {
399 translate([0,0,w]) 399 translate([0,0,w])
400 cube(size=[l,st_split_w,w]); 400 cube(size=[l,st_split_w,w]);
401 cube(size=[l-w,st_split_w,2*w]); 401 cube(size=[l-w,st_split_w,2*w]);
402 } 402 }
403 } 403 }
404 translate([0,0,-epsilon]) 404 translate([0,0,-epsilon])
405 cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); 405 cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance));
406 } 406 }
407 } 407 }
408 408
409 module knob() { 409 module knob() {
410 ch = knob_indent_d/2; 410 ch = knob_indent_d/2;
411 knob_bore_l = body_h-protrusion_h-pulley_elevation-pulley_h-knob_v_clearance;
411 translate([0,0,body_h+epsilon]) { 412 translate([0,0,body_h+epsilon]) {
412 mirror([0,0,1]) translate([0,0,-epsilon]) { 413 mirror([0,0,1]) translate([0,0,-epsilon]) {
413 difference() { 414 difference() {
414 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d); 415 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d);
415 translate([0,0,-1]) difference() { 416 translate([0,0,-1]) difference() {
416 cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2); 417 cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2);
417 translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1]) 418 translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1])
418 cube([bore_d+2,bore_d/2,knob_bore_l+4]); 419 cube([bore_d+2,bore_d/2,knob_bore_l+4]);
419 } 420 }
420 } 421 }
421 } 422 }
422 difference() { 423 difference() {
423 union() { 424 union() {
424 cylinder(d1=gearbox_d-2*ch,d2=gearbox_d,h=ch+epsilon,$fn=fnd*gearbox_d); 425 cylinder(d1=gearbox_d-2*ch,d2=gearbox_d,h=ch+epsilon,$fn=fnd*gearbox_d);
425 translate([0,0,ch]) 426 translate([0,0,ch])
426 cylinder(d=gearbox_d,h=knob_h-2*ch+epsilon,$fn=fnd*gearbox_d); 427 cylinder(d=gearbox_d,h=knob_h-2*ch+epsilon,$fn=fnd*gearbox_d);
427 translate([0,0,knob_h-ch]) 428 translate([0,0,knob_h-ch])
428 cylinder(d1=gearbox_d,d2=gearbox_d-2*ch,h=ch,$fn=fnd*gearbox_d); 429 cylinder(d1=gearbox_d,d2=gearbox_d-2*ch,h=ch,$fn=fnd*gearbox_d);
429 } 430 }
430 for(a=[0:360/knob_indents:359]) rotate([0,0,a]) 431 for(a=[0:360/knob_indents:359]) rotate([0,0,a])
431 translate([0,gearbox_d/2,-1]) 432 translate([0,gearbox_d/2,-1])
432 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d); 433 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d);
433 } 434 }
434 } 435 }
435 }//knob module 436 }//knob module
436 437
437 module debug() { 438 module debug() {
438 difference() { 439 difference() {
439 children(); 440 children();
440 if(debug) { 441 if(debug) {
441 // spring tensioner debug cutout 442 // spring tensioner debug cutout
442 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) 443 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0])
443 translate([0,-lever_thickness/2-1,-gearbox_d]) 444 translate([0,-lever_thickness/2-1,-gearbox_d])
444 cube(size=[body_h/2+1,lever_thickness/2+1,gearbox_d+2]); 445 cube(size=[body_h/2+1,lever_thickness/2+1,gearbox_d+2]);
445 // lever axis debug cutout 446 // lever axis debug cutout
446 translate([mount_d/2,0,-1]) 447 translate([mount_d/2,0,-1])
447 rotate([0,0,-45]) 448 rotate([0,0,-45])
448 cube(size=[gearbox_d-mount_d,gearbox_d-mount_d,body_h+knob_h+2]); 449 cube(size=[gearbox_d-mount_d,gearbox_d-mount_d,body_h+knob_h+2]);
449 // idler debug cutout 450 // idler debug cutout
450 translate([0,0,ls_z]) 451 translate([0,0,ls_z])
451 place_idler() 452 place_idler()
452 rotate([0,0,-45]) 453 rotate([0,0,-45])
453 translate([0,0,-lever_thickness/2-epsilon]) 454 translate([0,0,-lever_thickness/2-epsilon])
454 cube(size=[lsd*sqrt(2)/2+1,lsd*sqrt(2)/2+1, 455 cube(size=[lsd*sqrt(2)/2+1,lsd*sqrt(2)/2+1,
455 lever_thickness+2*epsilon]); 456 lever_thickness+2*epsilon]);
456 // pushfit debug cutout 457 // pushfit debug cutout
457 place_idler() 458 place_idler()
458 translate([-idler_d/2+filament_offset,0,ls_z]) 459 translate([-idler_d/2+filament_offset,0,ls_z])