Grow Y axis corners up when needed
[clinton/prusa3.git] / box_frame / x-carriage.scad
1 // PRUSA iteration3
2 // X carriage
3 // GNU GPL v3
4 // Josef Průša <josefprusa@me.com>
5 // Václav 'ax' Hůla <axtheb@gmail.com>
6 // http://www.reprap.org/wiki/Prusa_Mendel
7 // http://github.com/prusajr/PrusaMendel
8
9 include <configuration.scad>
10 use <bushing.scad>
11 // mounting plate
12 use <extras/groovemount.scad>
13
14 carriage_l = 86;
15 carriage_hole_to_side = 3;
16 carriage_hole_height = 4;
17
18
19 module x_carriage(){
20 mirror([1,0,0]) {
21 difference() {
22 union() {
23 //upper bearing
24 rotate([0,0,180]) {
25 linear(bushing_xy);
26 }
27 translate([6.5, -10, 0]) cube_fillet([4.5, 20, 29], vertical = [2,2,3,0]);
28
29 //lower bearing
30 translate([xaxis_rod_distance,0,0]) {
31 linear(bushing_xy, carriage_l);
32 }
33 translate([xaxis_rod_distance - 11.5, -10, 0]) cube_fillet([5, 20, carriage_l], radius=2);
34
35 // main plate
36 translate([14,-10.5,0]) cube_fillet([xaxis_rod_distance - 20,6.5,carriage_l], radius=2);
37 translate([6.5,-10.5,0]) cube_fillet([12,6.5,29], radius=2);
38
39 //reduce springiness
40 translate([9,6*single_wall_width,9]) cube([xaxis_rod_distance - 18, 5, 12]);
41
42
43 translate([20,0,carriage_hole_to_side]) {
44 rotate([90,0,0]) cylinder(r=(carriage_hole_to_side > 5 ? 5 : carriage_hole_to_side), h=12, center=true);
45 }
46 translate([20,0,carriage_l - carriage_hole_to_side]) {
47 rotate([90,0,0]) cylinder(r=(carriage_hole_to_side > 5 ? 5 : carriage_hole_to_side), h=12, center=true);
48 }
49
50 translate([45/2,0,0]){
51
52 // belt dummy
53 %translate([0,0,carriage_l/2]) cube([20,6,carriage_l], center = true);
54
55 //belt flat side
56 * difference() {
57 translate([-13.5,0,carriage_l/2]) cube_fillet([7,14,carriage_l], vertical = [3,3,0,0], center = true);
58 translate([-45/2,0,0]) bushing_negative();
59 }
60
61 difference(){
62 translate([-3.0,0,carriage_l/2]) cube_fillet([11,14,carriage_l], vertical = [2,2,0,0], center = true);
63 translate([-3.5,0,(carriage_l+38)/2]) cube([13,10,8], center = true);
64 translate([-8.5, 0, 0]) cube([2, 10, 28*2+1], center = true);
65 translate([0,0,28]) intersection() {
66 for (i = [0 : (carriage_l-28)/belt_tooth_distance])
67 {
68 translate([-8.5, 0, 1+i*belt_tooth_distance]) cube([2, 10, belt_tooth_distance*belt_tooth_ratio], center = true);
69 }
70 translate([0, 0, carriage_l/2]) cube([20, 10, carriage_l], center = true);
71 }
72 }
73
74 }
75 }
76 //upper bearing
77 rotate([0,0,180]) {
78 linear_negative(bushing_xy);
79 }
80
81 //lower bearing
82 translate([xaxis_rod_distance,0,0]) {
83 linear_negative(bushing_xy, carriage_l);
84 }
85 // extruder mounts
86
87 translate([20,-2,carriage_hole_to_side]) {
88 rotate([90,0,0]) cylinder(r=1.8, h=22, center=true);
89 translate([0,9,0]) rotate([90,60,0]) cylinder(r=3.4, h=5, $fn=6, center=true);
90 }
91 translate([20,-2,carriage_hole_to_side+30]) {
92 rotate([90,0,0]) cylinder(r=1.8, h=22, center=true);
93 translate([0,9,0]) rotate([90,60,0]) cylinder(r=3.4, h=5, $fn=6, center=true);
94 }
95 translate([20,-2,carriage_hole_to_side+30+20]) {
96 rotate([90,0,0]) cylinder(r=1.8, h=22, center=true);
97 translate([0,9,0]) rotate([90,60,0]) cylinder(r=3.4, h=5, $fn=6, center=true);
98 }
99 translate([20,-2,carriage_hole_to_side+30+20+30]) {
100 rotate([90,0,0]) cylinder(r=1.8, h=22, center=true);
101 translate([0,9,0]) rotate([90,60,0]) cylinder(r=3.4, h=5, $fn=6, center=true);
102 }
103
104 // belt clamp mounts
105 translate([20,-10.5,carriage_l-14]) belt_clamp_nut();
106 translate([20,-10.5,carriage_l-44]) belt_clamp_nut();
107
108 }
109 }
110 }
111
112 module belt_clamp_nut() {
113 translate([0,0,m3_nut_diameter/-2]) cube([2.5,m3_nut_diameter_bigger,m3_nut_diameter+0.3]);
114 translate([0,m3_nut_diameter_bigger/2,0]){
115 rotate([0, 90,0]) cylinder(r=3.5/2,h=10,$fn=32);
116 rotate([0,-90,0]) cylinder(r=3.5/2,h=30,$fn=32);
117 }
118 }
119 module x_beltclamp(){
120 translate([2,0,0]) difference(){
121 cube_fillet([carriage_l-32-30,17,7]);
122 translate([carriage_l-32-30,m3_nut_diameter_bigger,0]/2){
123 cylinder(r=3.4/2,h=30);
124 translate([0,0,7]) mirror([0,0,1]) screw(slant=false,r=1.7,head_drop=3);
125
126 }
127 }
128 }
129
130 x_carriage();
131 translate([carriage_l/-2-10,12,0]) x_beltclamp();
132 translate([carriage_l/-2+17,12,0]) x_beltclamp();
133
134 %translate([-13,-10,carriage_l]) rotate([90,90,90]) x_beltclamp();
135 %translate([-13,-10,carriage_l-30]) rotate([90,90,90]) x_beltclamp();