| 1 | include <configuration.scad> |
| 2 | use <bushing.scad> |
| 3 | rod_distance = 45; |
| 4 | |
| 5 | module x_end_motor(){ |
| 6 | |
| 7 | x_end_idler([3,3,0,0], thru=false); |
| 8 | /// motor dummy |
| 9 | //%translate([21-5,-21-11,25]) cube(size = [42,42,42], center = true); |
| 10 | |
| 11 | |
| 12 | difference(){ |
| 13 | translate([-4.5-10+2-1,-21-11+1,29.5]) cube_fillet(size = [17,44,45], center = true, vertical=[0,0,3,3], top=[0,3,6,3], bottom=[0,0,6,0]); |
| 14 | |
| 15 | // motor screw holes |
| 16 | translate([21-5,-21-11,30.25]){ |
| 17 | // belt hole |
| 18 | translate([-30,1,0]) cube(size = [10,46,22], center = true); |
| 19 | //motor mounting holes |
| 20 | translate([-41, 0, 0]) rotate([90, 0, 0]) rotate([0, 90, 0]) nema17(places=[1,1,1,1], holes=true, shadow=16, $fn=6, h=20); |
| 21 | translate([0,0,0]) rotate([0,-90,0]) rotate([0,0,90]) cylinder(h = 80, r=18, $fn=6); |
| 22 | } |
| 23 | } |
| 24 | translate([-22, -10.5, 0]) cube(size = [17, 2, 15]); |
| 25 | translate([-22, -10.5, 45]) cube(size = [17, 2, 10]); |
| 26 | //motor support |
| 27 | translate([-22, -53, 7]) cube(size = [17, 44, 1]); |
| 28 | translate([-22, -54, 0]) cube_fillet(size = [17, 3, 8], radius=1.5); |
| 29 | translate([-22, -30, 0]) cube_fillet(size = [17, 3, 8], radius=1.5); |
| 30 | } |
| 31 | |
| 32 | |
| 33 | module x_end_idler(vfillet=[3,3,3,3], thru=true){ |
| 34 | difference(){ |
| 35 | union(){ |
| 36 | difference(){ |
| 37 | translate([-4.5-10+2-1,17.5-10+2,30]) cube_fillet(size = [15+2,35+5,60], center = true, vertical=vfillet, top=[5,3,5,3]); |
| 38 | //#translate([0,0,26]) cube_fillet(size = [17,13.8,80], center = true); |
| 39 | //#cylinder(r=5.1, h=80); |
| 40 | bushing_negative(60); |
| 41 | } |
| 42 | //rotate([0,0,0]) translate([0,-9.5,0]) |
| 43 | echo(bearing_choice); |
| 44 | if (bearing_choice == 1) { |
| 45 | linear_bushing(); |
| 46 | } else { |
| 47 | linear_bearing(); |
| 48 | } |
| 49 | // Nut trap |
| 50 | difference(){ |
| 51 | if ((bearing_type == 1) || (bushing_type == 2)) { |
| 52 | translate([-2,17.5,4]) cube_fillet(size = [16,18,8], center = true, vertical=[3,0,0,0]); |
| 53 | } else { |
| 54 | translate([-2,17.5,4]) cube_fillet(size = [16,18,8], center = true, vertical=[3,0,0,3]); |
| 55 | } |
| 56 | |
| 57 | //bottom hole |
| 58 | translate([0,17,-1]) cylinder(h = 4, r=2.45); |
| 59 | //nut slid in |
| 60 | translate([5,17,4]) cube(size = [21,9.5,4.1], center = true); |
| 61 | |
| 62 | translate([0,17,6.5]) cylinder(h = 4, r=2.45); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | // belt hole |
| 67 | translate([-5.5-10+1.5,22-10,30]) cube(size = [10,46,32], center = true); |
| 68 | |
| 69 | if(thru == true){ |
| 70 | translate([-14,-11,6]) rotate([-90,0,0]) pushfit_rod(8,50); |
| 71 | translate([-14,-11,rod_distance+6]) rotate([-90,0,0]) pushfit_rod(8,50); |
| 72 | } else { |
| 73 | translate([-14,-7,6]) rotate([-90,0,0]) pushfit_rod(8,50); |
| 74 | translate([-14,-7,rod_distance+6]) rotate([-90,0,0]) pushfit_rod(8,50); |
| 75 | } |
| 76 | |
| 77 | // idler hole |
| 78 | translate([0,17+7,30.25]) rotate([0,-90,0]) cylinder(h = 80, r=2.2, $fn=30); |
| 79 | |
| 80 | } |
| 81 | |
| 82 | //threaded rod |
| 83 | translate([0,17,0]) %cylinder(h = 70, r=2.5); |
| 84 | |
| 85 | } |
| 86 | mirror([0,0,0]) x_end_idler(thru=true); |
| 87 | // translate([40,40,0]) x_end_idler(thru=false); |
| 88 | translate([40,0,0]) mirror([0,1,0]) x_end_motor(); |
| 89 | |
| 90 | module pushfit_rod(diameter,length){ |
| 91 | cylinder(h = length, r=diameter/2, $fn=30); |
| 92 | translate([0,-diameter/4,length/2]) cube(size = [diameter,diameter/2,length], center = true); |
| 93 | |
| 94 | translate([0,-diameter/2-1.2,length/2]) cube(size = [diameter,1,length], center = true); |
| 95 | } |