move bearing-guide.scad to inc/, add guides to x-end/y-drivetrain
[clinton/prusa3.git] / box_frame / y-drivetrain.scad
CommitLineData
2159eed1
VAH
1// PRUSA iteration3
2// Y drivetrain (idler and stepper holders)
7e896b17 3// GNU GPL v3
2159eed1
VAH
4// Josef Průša <josefprusa@me.com>
5// Václav 'ax' Hůla <axtheb@gmail.com>
7e896b17
VAH
6// http://www.reprap.org/wiki/Prusa_Mendel
7// http://github.com/prusajr/PrusaMendel
8
7e896b17 9include <configuration.scad>
eff6608e 10use <inc/bearing-guide.scad>
7e896b17
VAH
11
12module motorholder(thickness=10){
13 difference(){
14 union(){
15 // Motor holding part
3ade0448 16 translate([29,-21+50,0])
7e896b17 17 {
4bf15d1b 18 //#cube([42,42,2], center=true);
7e896b17
VAH
19 difference(){
20 union(){
4bf15d1b 21 translate([-21+4.5,0,5]) cube([9,31,thickness], center=true);
f35bb1ce
KY
22 nema17([0,1,1,0], thickness=thickness, shadow=false);
23 mirror([0,0,1])translate([0,0,-10])nema17([0,1,1,0], thickness=thickness, shadow=7);
7e896b17 24 // Parts joining part
4bf15d1b 25 translate([-29,-21,0]) cube([14,30,thickness]);
7e896b17
VAH
26 }
27 // Motor mounting holes
6acc0330 28 translate([0,0,thickness]) mirror([0,0,1]) nema17([0,1,1,0], thickness=thickness, holes=true);
7e896b17
VAH
29 }
30 }
31
32 // Front holding part
3ade0448 33 translate([0,10,0]) cylinder(h = thickness, r=8);
4bf15d1b 34 translate([0,20,5]) cube([16,20,thickness], center=true);
3ade0448 35 translate([0,30,0]) cylinder(h = thickness, r=8);
7e896b17 36 }
3ade0448
VAH
37 translate([0,10,-1]) cylinder(h = 12, r=4.5);
38 translate([0,30,-1]) cylinder(h = 12, r=4.5);
7e896b17
VAH
39 }
40}
41
b325d8c2
KY
42module oval(r=4,l=15,h=2){
43translate([l/2,0,0])cylinder(r=r,h=h,$fn=4);
44translate([-l/2,0,0])cylinder(r=r,h=h,$fn=4);
45translate([0,0,h/2])cube([l,r*2,h],center=true);
46}
47
7e896b17 48
88fc28e9 49module idlermount(){
7e896b17
VAH
50 difference(){
51 union(){
b325d8c2 52 translate([0, idler_bearing[2]/2 - 6, 0] ) cube_fillet([16,40 + idler_bearing[2], 10 + idler_width], vertical = [0,0,0,0], top = [3,0,3,0], bottom = [3,0,3,0], center=true);
7e896b17 53 }
690004c7 54// translate([0,12,-1]) cylinder(h = 120, r=idler_bearing[2]/2 + 1, $fn=7, center=true);
b325d8c2
KY
55 translate([0,-10,-12]) rotate([0,0,90]) oval(r=4.5,l=12,h=25);
56 translate([0,-20,0]) rotate([90,60,0]) cylinder(r=3.4, h=5, $fn=6, center=true);
57 translate([0,-20,0]) rotate([90,0,0]) cylinder(r=3.2/2, h=15, $fn=10, center=true);
7e896b17 58
690004c7
VAH
59// translate([0,12,0]) {
60// %cylinder(h = idler_width, r=(idler_bearing[0] / 2) + 2 * single_wall_width, center=true);
61// cylinder(h = idler_width + 1, r=(idler_bearing[0] / 2) + 8, center=true);
62// }
c4e4d509
VAH
63 translate([0,12,0]) {
64 idler_assy(idler_bearing);
65 translate([0, 10, 0]) cube([20, 20, idler_width + 1], center=true);
66 }
67
7e896b17 68 }
7e896b17
VAH
69}
70
b325d8c2 71
42e0b559 72motorholder();
88fc28e9 73translate([32,20,8]) rotate([0,90,0]) idlermount();
7337be14 74
eff6608e
VAH
75if (idler_bearing[3] == 1) {
76 translate([0, -12 - idler_bearing[0] / 2, 0]) {
77 bearing_guide_inner();
78 translate([idler_bearing[0]+10, 0, 0])
79 bearing_guide_outer();
80 }
81}