4 // Josef Průša <iam@josefprusa.cz> and contributors
5 // http://www.reprap.org/wiki/Prusa_Mendel
6 // http://prusamendel.org
8 // Also includes code from Wilson and Wilson2, (c) Marty Rice
9 // https://github.com/mjrice/wilson
11 // todo: make x-end height global and make anything relying implicitly
12 // on the height of the x-end use that for positioning.
14 // bearing height, strain relief (&& maybe make dependent upon the bearing diameter)
16 // major issues with rev 3
18 // - motor side screw hole conflicts with switch / other rear mount is
19 // inaccessible without removing the leadscrew from the nut
21 // - New idler anti-pitching ribs are too big (new idler I wasn't
22 // using is larger so the existing ones worked fine for that one...)
23 // NOTE: new idler is meant for integrated toothed idler...
26 include <configuration.scad>
28 pushfit_d = bushing_xy[0] * 2 + 0.25; //smooth_rod_d + 0.25;
30 x_box_height = 5 + rod_distance + bushing_xy[0] * 2 + 0.25;
34 module vertical_bushing_base(bushing){
35 bushing_size = bushing[1]*2 + 2 * thinwall;
36 translate(v=[-2-bushing_size/4,0,x_box_height/2]) cube(size = [4+bushing_size/2,bushing_size,x_box_height], center = true);
37 cylinder(h = x_box_height, r=bushing_size/2, $fn = 90);
40 module vertical_bushing_holes(bushing){
41 bushing_cut_extra = 0.2; // padding so it's not too tight
42 translate(v=[0,0,-4]) cylinder(h = x_box_height + 3, r=bushing[1] + bushing_cut_extra, $fn = 60);
43 translate(v=[0,0,x_box_height-4]) cylinder(h=x_box_height,r=bushing[1]-1,$fn=60);
44 // TODO: make translate(z) use x_box_height to correctly position slit
45 #rotate(a=[0,0,-50]) translate(v=[8,0,24/*was 31.5 mjr*/]) cube(size = [10,2 /*was 1 mjr*/ ,x_box_height+13], center = true);
46 translate([0,0,-1]) cylinder(h=9,r1=bushing[1]+thinwall/2+1,r2=4,$fn=60);
47 //#translate([0,0,49]) cylinder(h=9,r2=bushing[1]+thinwall/2,r1=4,$fn=60);
51 module nut_trap_base () {
52 cube(size=[16,21,8],center=true);
53 translate ([2,0,0]) cylinder(h=8,r=12.5,$fn=50,center=true);
58 // center post of brass nut
59 cylinder(h=12,r=5.45,$fn=50,center=true);
60 // holes for m3 screws in brass nut
61 translate(v=[8,0,0]) cylinder(h=12,r=1.8,$fn=20,center=true);
62 #rotate([0,0,90]) translate(v=[8,0,0]) cylinder(h=12,r=1.8,$fn=20,center=true);
63 rotate([0,0,180]) translate(v=[8,0,0]) cylinder(h=12,r=1.8,$fn=20,center=true);
64 #rotate([0,0,270]) translate(v=[8,0,0]) cylinder(h=12,r=1.8,$fn=20,center=true);
70 height = x_box_height;
71 // TODO: calculate correct translate(y) + cube(y) using size of bearing
72 translate(v=[-15,-10,height/2]) cube(size = [17,45,height], center = true);
74 vertical_bushing_base(bushing_z);
76 translate(v=[-4+zmotor_delta_x,-17-zmotor_delta_y,4]) nut_trap_base ();
78 // #translate(v=[-2-2,-17,4]) cube(size = [8,16,8], center = true);
80 // #translate(v=[0,-17,0]) rotate([0,0,30]) cylinder(h = 8, r=8, $fn = 6);
84 vertical_bushing_holes(bushing_z);
86 translate(v=[-1,0,0]){
88 translate(v=[-5.5-10+1.5,-bushing_z[1]-4,30]) cube(size = [20,1,28], center = true);
89 // Cut out for belt (this is NOT centered because the motor isn't centered)
91 translate(v=[-5.5-10+1.5,-10,30]) cube(size = [10,46,28], center = true);
94 translate(v=[-5.5-10+1.5,-10,30+23]) rotate([0,45,0]) cube(size = [10,46,28], center = true);
95 translate(v=[-5.5-10+1.5,-10,30+23]) rotate([0,-45,0]) cube(size = [10,46,28], center = true);
96 translate(v=[-5.5-10+1.5,-10,30-23]) rotate([0,45,0]) cube(size = [10,46,28], center = true);
97 translate(v=[-5.5-10+1.5,-10,30-23]) rotate([0,-45,0]) cube(size = [10,46,28], center = true);
103 pushrod_extra_z = 2.5;
104 // Bottom pushfit rod
105 #translate(v=[-15,-41.5,bushing_xy[0]+pushrod_extra_z]) rotate(a=[-90,0,0]) pushfit_rod(pushfit_d,50);
107 translate(v=[-15,-41.5,rod_distance+bushing_xy[0]+pushrod_extra_z]) rotate(a=[-90,0,0]) pushfit_rod(pushfit_d,50);
109 translate(v=[zmotor_delta_x,-17-zmotor_delta_y,3]) rotate ([0, 0, 45]) nut_trap ();
110 // #translate(v=[0,-17,-0.5]) cylinder(h = 4, r1=3.4, r2=2.9, $fn=25);
111 // translate(v=[0,-17,3]) rotate([0,0,30]) cylinder(h = 10, r=hex_nut_r, $fn = 6);
116 module x_end_plain(){
126 module pushfit_rod(diameter,length){
127 translate([0,-0.3,0]) cylinder(h = length, r=diameter/2, $fn=30);
128 translate([0,0.3,0]) cylinder(h = length, r=diameter/2, $fn=30);
130 // translate(v=[0,-diameter/2.85,length/2]) rotate([0,0,45]) cube(size = [diameter/2,diameter/2,length], center = true);
131 // translate(v=[0,-diameter/4-diameter/2-0.4,length/2]) rotate([0,0,0]) cube(size = [diameter,diameter/2,length], center = true);