x-end: refine integration with MK3 idler tensioner
[clinton/prusa3.git] / box_frame / inc / bearing-guide.scad
CommitLineData
2159eed1 1// PRUSA iteration3
692cedb6
VAH
2// Bearing guide
3// GNU GPL v3
2159eed1
VAH
4// Josef Průša <josefprusa@me.com>
5// Václav 'ax' Hůla <axtheb@gmail.com>
6// Original design by Greg Frost
692cedb6 7// http://www.reprap.org/wiki/Prusa_Mendel
8e93419f 8// http://github.com/josefprusa/Prusa3
692cedb6 9
65a72cd5 10// ThingDoc entry
692cedb6 11/**
65a72cd5 12 * @description Helps to hold belt aligned on the bearing.
692cedb6
VAH
13 * @id bearing-guide
14 * @name Bearing guide
15 * @category Printed
16 */
17
eff6608e 18include <../configuration.scad>
4e1cf096 19include <functions.scad>
692cedb6 20
4e1cf096
VAH
21//guiding_wall_thickness of guiding wall
22guiding_wall_thickness=layer_height * 4;
88fc28e9 23
4e1cf096
VAH
24
25height = max(belt_width, idler_bearing[1]) + guiding_wall_thickness;
26//How much the guiding wall overlaps the bearing wall (to the center)
88fc28e9 27wall_descent = 1;
692cedb6 28
4e1cf096
VAH
29module bearing_guide_inner(){
30 //inner (smaller) part of the guide
88fc28e9 31 difference(){
4e1cf096
VAH
32 cylinder(r=idler_bearing[0] / 2 + single_wall_width * 3, h=height - (max( idler_bearing[1], belt_width) - idler_bearing[1]) / 2);
33 translate([0, 0, -1])
34 cylinder(r=idler_bearing[0] / 2, h=height + 2);
692cedb6
VAH
35 }
36
88fc28e9
VAH
37 difference(){
38 union() {
4e1cf096
VAH
39 cylinder(r=idler_assy_r_outer(idler_bearing), h=guiding_wall_thickness); //guide wall
40 cylinder(r=idler_bearing[0] / 2, h=guiding_wall_thickness + (belt_width - idler_bearing[1])/2); //this centers the guide on bearing
88fc28e9 41 }
692cedb6 42 translate([0,0,-1])
4e1cf096 43 cylinder(r=idler_bearing[0] / 2 - wall_descent, h=guiding_wall_thickness + 10);
692cedb6
VAH
44 }
45}
46
4e1cf096 47module bearing_guide_outer(){
88fc28e9 48 difference(){
4e1cf096 49 cylinder(r=idler_bearing[0] / 2 + 6 * single_wall_width + 0.2, h=height);
692cedb6 50 translate([0,0,-1])
815fe4ec 51 cylinder(r=idler_bearing[0] / 2 + single_wall_width * 3, h=height + 2);
692cedb6
VAH
52 }
53
88fc28e9
VAH
54 difference(){
55 union(){
4e1cf096
VAH
56 cylinder(r=idler_assy_r_outer(idler_bearing), h=guiding_wall_thickness);
57 cylinder(r=idler_bearing[0] / 2, h=guiding_wall_thickness + (belt_width - idler_bearing[1])/2);
88fc28e9 58 }
692cedb6 59 translate([0,0,-1])
4e1cf096 60cylinder(r=idler_bearing[0]/2-wall_descent, h=height + 5);
692cedb6
VAH
61 }
62}
63
4e1cf096 64module bearing_assy(){
692cedb6 65
4e1cf096
VAH
66 bearing_guide_inner();
67 translate([idler_assy_r_outer(idler_bearing) * 2 + 2, 0, 0])
68 bearing_guide_outer();
2159eed1 69}
4e1cf096
VAH
70
71bearing_assy();