fixed last commit for single plate
[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
f705c26c 16 translate([29, -21 + 50, 0])
7e896b17 17 {
f705c26c 18 //#cube([42, 42, 2], center=true);
7e896b17
VAH
19 difference(){
20 union(){
f705c26c
VAH
21 translate([-21 + 4.5, 0, 5]) cube([9, 31, thickness], center=true);
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
f705c26c 25 translate([-29, -21, 0]) cube([14, 30, thickness]);
7e896b17
VAH
26 }
27 // Motor mounting holes
f705c26c 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
f705c26c
VAH
33 translate([0, 10, 0]) cylinder(h = thickness, r=8);
34 translate([0, 20, 5]) cube([16, 20, thickness], center=true);
35 translate([0, 30, 0]) cylinder(h = thickness, r=8);
7e896b17 36 }
8dd48710
JG
37 translate([0, 10, -1]) cylinder(h = 12, r=4.5, $fn=32);
38 translate([0, 30, -1]) cylinder(h = 12, r=4.5, $fn=32);
7e896b17
VAH
39 }
40}
41
67f4a88f 42module oval(r=4, l=14, h=2){
0d8b4afe
VAH
43 intersection() {
44 union() {
45 translate([l / 2, 0, 0]) cylinder(r=r, h=h, $fn=4);
67f4a88f 46 //translate([-l / 2, 0, 0]) cylinder(r=r, h=h, $fn=4);
0d8b4afe
VAH
47 translate([0, 0, h / 2]) cube([l, r * 2, h], center=true);
48 }
49 translate([0, 0, h / 2]) cube([l + r * 1.2, r * 2, h], center=true);
50 }
b325d8c2
KY
51}
52
f705c26c 53module idlermount(len=42, narrow_len=0, narrow_width=0, rod=threaded_rod_diameter_horizontal / 2, idler_height=16){
7e896b17
VAH
54 difference(){
55 union(){
f705c26c 56 //wide part holding bearing
6229a141 57 translate([- (10 + idler_width) / 2, -25 + narrow_len, 0] ) cube_fillet([10 + idler_width, len + idler_bearing[2] * 1.1 - narrow_len, idler_height]);
0d8b4afe 58 //For X there is narrow part inside the x-idler
f705c26c
VAH
59 if (narrow_len > 0){
60 translate([-narrow_width / 2, -25, 0] ) cube_fillet([narrow_width, len + idler_bearing[2], idler_height], vertical=[0, 0, 2, 2]);
6229a141
VAH
61 mirror([1, 0, 0]) translate([-narrow_width / 2, narrow_len -25, idler_height / 2 ]) fillet(1.5, idler_height - 0.04, $fn=8);
62 translate([-narrow_width / 2, narrow_len -25, idler_height / 2]) fillet(1.5, idler_height - 0.04, $fn=8);
f705c26c 63 }
7e896b17 64 }
b4cb7357 65 translate([-12, -9, idler_height / 2]) rotate([90, 0, 90]) oval(r=rod + 0.01, l=12, h=25);
8dd48710 66 translate([0, -15 - single_wall_width*2, idler_height / 2]) {
67f4a88f 67 //nut
8dd48710 68 translate([0,0.2,0]) rotate([90, 0, 0]) cylinder(r=m4_nut_diameter_horizontal / 2, h=3.5, $fn=6);
67f4a88f 69 //nut insert
8dd48710 70 translate([0, -3.3, -m4_diameter * 1.5 / 2]) cube([20, 3.5, m4_diameter * 1.5]);
67f4a88f
VAH
71 }
72
8dd48710 73 translate([0, -19, idler_height / 2]) rotate([90, 90, 0]) cylinder(r=m4_diameter / 2, h=15, $fn=small_hole_segments, center=true);
f705c26c
VAH
74 translate([0, len + idler_bearing[2] - 33, idler_height / 2]) {
75 rotate([0, 90, 0]) idler_assy(idler_bearing);
76 translate([0, 10, 0]) cube([idler_width + 1, 20, idler_height + 2], center=true);
c4e4d509
VAH
77 }
78
7e896b17 79 }
7e896b17
VAH
80}
81
b325d8c2 82
42e0b559 83motorholder();
f705c26c 84translate([32, 20, 0]) idlermount();
7337be14 85
eff6608e
VAH
86if (idler_bearing[3] == 1) {
87 translate([0, -12 - idler_bearing[0] / 2, 0]) {
88 bearing_guide_inner();
f705c26c 89 translate([idler_bearing[0] + 10, 0, 0])
eff6608e
VAH
90 bearing_guide_outer();
91 }
92}