update TS models, minor changes for fit
[clinton/wilson.git] / scad / bearing.scad
1 // PRUSA iteration3
2 // Bearing holders
3 // GNU GPL v3
4 // Josef Průša <iam@josefprusa.cz> and contributors
5 // http://www.reprap.org/wiki/Prusa_Mendel
6 // http://prusamendel.org
7 // Alterations for Wilson by MRice <mrice411@gmail.com>
8
9 bearing_diameter = 15;
10
11 module horizontal_bearing_base(bearings=1){
12 translate(v=[0,0,6]) cube(size = [24,8+bearings*25,12], center = true);
13 }
14 module horizontal_bearing_holes(bearings=1){
15 cutter_lenght = 10+bearings*25;
16 one_holder_lenght = 8+25;
17 holder_lenght = 8+bearings*25;
18
19 // Main bearing cut
20 difference(){
21 translate(v=[0,0,12]) rotate(a=[90,0,0]) translate(v=[0,0,-cutter_lenght/2]) cylinder(h = cutter_lenght, r=bearing_diameter/2, $fn=50);
22 // Bearing retainers
23 translate(v=[0,1-holder_lenght/2,3]) cube(size = [24,6,8], center = true);
24 translate(v=[0,-1+holder_lenght/2,3]) cube(size = [24,6,8], center = true);
25 }
26
27 // Ziptie cutouts
28 ziptie_cut_ofset = 0;
29 for ( i = [0 : bearings-1] ){
30 // For easier positioning I move them by half of one
31 // bearing holder then add each bearign lenght and then center again
32 translate(v=[0,-holder_lenght/2,0]) translate(v=[0,one_holder_lenght/2+i*25,0]) difference(){
33 union(){
34 translate(v=[0,2-6,12]) rotate(a=[90,0,0]) translate(v=[0,0,0]) cylinder(h = 4, r=12.5, $fn=50);
35 translate(v=[0,2+6,12]) rotate(a=[90,0,0]) translate(v=[0,0,0]) cylinder(h = 4, r=12.5, $fn=50);
36 }
37 translate(v=[0,10,12]) rotate(a=[90,0,0]) translate(v=[0,0,0]) cylinder(h = 24, r=10, $fn=50);
38 }
39 }
40
41 }
42
43 module horizontal_bearing_test(){
44 difference(){
45 horizontal_bearing_base(1);
46 horizontal_bearing_holes(1);
47 }
48 translate(v=[30,0,0]) difference(){
49 horizontal_bearing_base(2);
50 horizontal_bearing_holes(2);
51 }
52 translate(v=[60,0,0]) difference(){
53 horizontal_bearing_base(3);
54 horizontal_bearing_holes(3);
55 }
56 }
57
58
59
60 thinwall = 3;
61 bearing_size = bearing_diameter + 2 * thinwall;
62
63 module vertical_bearing_base(){
64 translate(v=[-2-bearing_size/4,0,29]) cube(size = [4+bearing_size/2,bearing_size,58], center = true);
65 cylinder(h = 58, r=bearing_size/2, $fn = 90);
66 }
67
68 module vertical_bearing_holes(){
69 translate(v=[0,0,-1]) cylinder(h = 62, r=bearing_diameter/2, $fn = 60);
70 #rotate(a=[0,0,-70]) translate(v=[8,0,30/*was 31.5 mjr*/]) cube(size = [5,2 /*was 1 mjr*/ ,62], center = true);
71 }
72
73 difference(){
74 vertical_bearing_base();
75 vertical_bearing_holes();
76 }