Merge branch 'fillet'
[clinton/prusa3.git] / 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
12 carriage_l = 70;
13
14 //upper (long) bearing
15 translate([0,0,0]) rotate([0,0,180]) {
16 if (bearing_choice == 2) {
17 linear_bearing(carriage_l, fillet = true);
18 //%linear_bushing(carriage_l);
19 } else {
20 linear_bushing(carriage_l);
21 //%linear_bearing(carriage_l);
22 }
23 }
24
25 //lower bearing
26 translate([45,0,0]) {
27 if (bearing_choice == 2) {
28 linear_bearing(fillet =true);
29 //%linear_bushing(25);
30 } else {
31 linear_bushing(27);
32 //%linear_bearing(30);
33 }
34 }
35
36 // main plate
37 difference(){
38 translate([5,-10,0]) cube_fillet([45-10,5,carriage_l], radius=2);
39 translate([55,-17.5, 67]) rotate([0,70,0]) cube([80,60,60], center = true);
40 }
41
42 //reduce springiness
43
44 translate([6,5,20]) cube([32,5,8]);
45
46 /*
47 // mounting plate
48 difference(){
49 translate([2.5-13.8/2, -17.5,35]) cube([5,35,carriage_l], center = true);
50 translate([2.5-13.8/2, -17.5,35]) cube([7,25,25], center = true);
51 translate([0,-17.5, 35-25]) rotate([0,-90,0]) cylinder(h = 80, r=2.5, $fn=30);
52 translate([0,-17.5, 35+25]) rotate([0,-90,0]) cylinder(h = 80, r=2.5, $fn=30);
53 }
54 */
55
56 translate([45/2,0,0]){
57
58 // belt dummy
59 %translate([0,0,carriage_l/2]) cube([20,6,carriage_l], center = true);
60
61 //belt flat side
62 translate([-11,0,carriage_l/2]) cube_fillet([2,14,carriage_l], vertical = [3,0,0,0], center = true);
63
64 difference(){
65 translate([-5.5,0,carriage_l/2]) cube_fillet([7,14,carriage_l], vertical = [2,2,0,0], center = true);
66 translate([-5.5,0,carriage_l/2]) cube([9,10,40], center = true);
67
68 intersection() {
69 for (i = [0 : carriage_l/belt_tooth_distance])
70 {
71 translate([-8.5, 0, 1+i*belt_tooth_distance]) cube([2, 10, belt_tooth_distance*belt_tooth_stride], center = true);
72 }
73 translate([0, 0, carriage_l/2]) cube([20, 10, carriage_l], center = true);
74 }
75 }
76
77 }