More plastic around screw holding the tensioner in x-end
[clinton/prusa3.git] / box_frame / x-end.scad
CommitLineData
2159eed1
VAH
1// PRUSA iteration3
2// X ends
3// GNU GPL v3
dba99e69 4// Josef Průša <josefprusa@me.com>
3b7acad1 5// Václav 'ax' Hůla <axtheb@gmail.com>
2159eed1
VAH
6// http://www.reprap.org/wiki/Prusa_Mendel
7// http://github.com/prusajr/PrusaMendel
8
2fc35ca2 9include <configuration.scad>
d3618a65 10use <bushing.scad>
eff6608e 11use <inc/bearing-guide.scad>
f705c26c 12use <y-drivetrain.scad>
86c402d8 13
1e67bf0e
VAH
14//height and width of the x blocks depend on x smooth rod radius
15x_box_height = 52 + 2 * bushing_xy[0];
16x_box_width = (bushing_xy[0] <= 4) ? 17.5 : bushing_xy[0] * 2 + 9.5;
d3618a65
NZ
17
18module x_end_motor(){
19
690004c7 20 mirror([0, 1, 0]) {
c7eb29ba 21
02345ac0 22 x_end_base([3, 3, min((bushing_xy[0] - 4) * 2, 3), 0], thru=false);
c7eb29ba 23
690004c7
VAH
24
25 translate([0, -z_delta - 2, 0]) difference(){
79b4b60a 26 union(){
f705c26c
VAH
27 intersection() {
28 translate([-15, -34, 30]) cube([20, 60, x_box_height], center = true);
29 union() {
30 translate([-13.75, -14 + z_delta / 2, 24]) cube_fillet([17.5, 14 + z_delta, 55], center = true, vertical=[0, 0, 3, 1.5], top=[0, 3, 6, 3], $fn=16);
31 translate([-10, -34, 9]) intersection(){
32 translate([0, 0, -5]) cube_fillet([10, 37, 28], center = true, vertical=[0, 0, 0, 0], top=[0, 3, 5, 3]);
33 translate([-10/2, 10, -26]) rotate([45, 0, 0]) cube_fillet([10, 60, 60], radius=2);
34 }
35 }
79b4b60a 36 }
f705c26c 37 translate([-15.5, -32, 30.25]) rotate([90, 0, 0]) rotate([0, 90, 0]) nema17(places=[1, 0, 1, 1], h=11);
82e9f136 38 }
c7eb29ba 39
79b4b60a 40 // motor screw holes
690004c7 41 translate([21-5, -21-11, 30.25]){
79b4b60a 42 // belt hole
f705c26c 43 translate([-30, 11, -0.25]) cube([11, 36, 24], center = true);
79b4b60a 44 //motor mounting holes
f705c26c 45 translate([-28.5, 0, 0]) rotate([0, 0, 0]) rotate([0, 90, 0]) nema17(places=[1, 1, 0, 1], holes=true, shadow=5, $fn=7, h=8);
79b4b60a 46 }
c7eb29ba 47 }
79b4b60a 48 //smooth rod caps
f7c38069
VAH
49 translate([-22, -10, 0]) cube([17, 2, 15]);
50 translate([-22, -10, 45]) cube([17, 2, 10]);
c7eb29ba 51 }
d3618a65
NZ
52}
53
f705c26c 54module x_end_base(vfillet=[3, 3, 3, 3], thru=true, len=40, offset=0){
d3618a65 55
c7eb29ba
VAH
56 difference(){
57 union(){
f705c26c 58 translate([-10 - bushing_xy[0], -10 + len / 2 + offset, 30]) cube_fillet([x_box_width, len, x_box_height], center=true, vertical=vfillet, top=[5, 3, 5, 3]);
690004c7
VAH
59
60 translate([0, 0, 4 - bushing_xy[0]]) {
61 //rotate([0, 0, 0]) translate([0, -9.5, 0])
f705c26c 62 translate([z_delta, 0, 0]) render(convexity = 5) linear(bushing_z, x_box_height);
690004c7
VAH
63 // Nut trap
64 //difference(){
f705c26c 65 translate([-2, 17, 4]) cube_fillet([20, 16, 8], center = true, vertical=[7, 0, 0, 0], $fn=4);
690004c7
VAH
66 //bottom hole
67 //}
c7eb29ba
VAH
68 }
69 }
690004c7
VAH
70 // here are bushings/bearings
71 translate([z_delta, 0, 4 - bushing_xy[0]]) linear_negative(bushing_z, x_box_height);
d3618a65 72
c7eb29ba 73 // belt hole
f705c26c 74 translate([-5.5 - 10 + 1.5, 22 - 9 + offset, 30]) cube([max(idler_width + 2, 11), 55, 27], center = true);
690004c7 75
f705c26c 76 translate([-10 - bushing_xy[0], offset, 0]) {
690004c7
VAH
77 if(thru == true){
78 translate([0, -11, 6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
79 translate([0, -11, xaxis_rod_distance+6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
80 } else {
81 translate([0, -7, 6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
82 translate([0, -7, xaxis_rod_distance+6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
83 }
84 }
85 translate([0, 0, 4 - bushing_xy[0]]) { // m5 nut insert
86 translate([0, 17, -10]) rotate([0,0,45]){
87 cylinder(h = 40, r=2.75);
88 //nut slid in
89 translate([3, 0, 14]) cube([9.2*2, 9.2*sqrt(3/4)+0.4, 4.1], center = true);
90 }
c7eb29ba 91 }
c7eb29ba 92 }
c7eb29ba 93 //threaded rod
690004c7 94 translate([0, 17, 0]) %cylinder(h = 70, r=2.5+0.2);
d3618a65 95}
79b4b60a 96
79b4b60a
VAH
97module x_end_idler(){
98 difference() {
42436753 99 x_end_base(len=45 + z_delta / 3, offset=-10 - z_delta / 3);
79b4b60a 100 // idler hole
42436753 101 translate([-20, -15 - z_delta / 2, 30]) {
f705c26c
VAH
102 rotate([0, 90, 0]) cylinder(r=m4_diameter / 2, h=33, center=true, $fn=7);
103 translate([15 - 2 * single_wall_width, 0, 0]) rotate([90, 0, 90]) cylinder(r=m4_nut_diameter_horizontal / 2, h=3, $fn=6);
104
79b4b60a 105 }
f705c26c 106 translate([-6 - x_box_width, 11, 20]) cube([x_box_width + 1, 11, 21]);
79b4b60a 107 }
f705c26c 108 %translate([-14, -9, 20]) x_tensioner();
79b4b60a
VAH
109}
110
f705c26c
VAH
111module x_tensioner(len=62, idler_height=20) {
112 idlermount(len=len, rod=3.4, idler_height=idler_height, narrow_len=46, narrow_width=idler_width + 2 - single_wall_width);
113}
114
115
42436753 116//translate([-40, 0, 4 - bushing_xy[0]]) x_tensioner();
690004c7
VAH
117mirror([0, 0, 0]) x_end_idler(thru=true);
118// translate([40, 40, 0]) x_end_idler(thru=false);
42436753 119//translate([50, 0, 0]) x_end_motor();
d3618a65 120
690004c7 121module pushfit_rod(diameter, length){
c7eb29ba 122 cylinder(h = length, r=diameter/2, $fn=30);
690004c7 123 translate([0, -diameter/4, length/2]) cube([diameter, diameter/2, length], center = true);
d3618a65 124
690004c7 125 translate([0, -diameter/2-1.2, length/2]) cube([diameter, 1, length], center = true);
d3618a65 126}
eff6608e
VAH
127
128if (idler_bearing[3] == 1) {
129 translate([-25, -20 - idler_bearing[0] / 2, 0]) {
130 render() bearing_guide_inner();
131 translate([idler_bearing[0]+10, 0, 0])
132 render()bearing_guide_outer();
133 }
134}