x-end: refine integration with MK3 idler tensioner
[clinton/prusa3.git] / box_frame / x-end-idler.scad
CommitLineData
1ddd0d1f
CE
1// PRUSA iteration3
2// X end idler
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 reprap wilson by M. Rice <mrice411@gmail.com>
8
9include <configuration.scad>
10use <x-end.scad>
be37e860
CE
11use <inc/bearing-guide.scad>
12use <y-drivetrain.scad>
1ddd0d1f 13
be37e860 14// todo:
1ddd0d1f 15
8b6f821b
CE
16// Bearing is being moved back into mount and separate tensioner
17// removed, need to ensure the width of the slot is wide enough to fix
18// the bearing plus 1-2mm clearance. Can calculate along with
50a95463
CE
19// x_box_width in settings.scad. Slot is slightly too narrow for a
20// Gates GT2 idler for example.
8b6f821b
CE
21
22// radius of screw hole for pulley (todo: ideally would adjust to
23// closest screw diameter to idler_bearing inner diameter)
24pulley_mount_radius = m4_diameter/2;
25// Y position of the pulley mount, adjusted to clear z bearing
26// fixme: not sure about z_delta/2 anymore
27pulley_mount_y = x_base_inside()
28 // ensuring entire bearing fits inside idler
29 + idler_bearing[0]
30 // including flange (even if not using bearing guide since
31 // bearings without will have their own flanges and the size of
32 // those is not configurable)
33 + (idler_assy_r_outer(idler_bearing) - idler_assy_r_inner(idler_bearing))
34 // and recess by 2mm
35 + 2
36 - z_delta / 2;
37// Z position of pulley mount, adjusted so bottom of idler aligns with
38// bottom of motor pulley (note: in the x-carriage currently generated
39// this is backward since the belt runs above the carriage mounting
40// points)
41pulley_mount_z = x_motor_shaft_z () + (motor_pulley[0]/2 - idler_bearing[0]/2);
1ddd0d1f
CE
42
43module x_end_idler_base(){
44 x_end_base();
45}
46
47module x_end_idler_holes(){
48 x_end_holes();
be37e860
CE
49
50 // tensioner mount
8b6f821b
CE
51 translate([-20, pulley_mount_y, pulley_mount_z]) {
52 #rotate([0, 90, 0]) cylinder(r=pulley_mount_radius, h=33, center=true, $fn=small_hole_segments);
be37e860
CE
53 translate([15 - 2 * single_wall_width, 0, 0]) rotate([90, 0, 90]) cylinder(r=m4_nut_diameter_horizontal / 2, h=3, $fn=6);
54 }
1ddd0d1f 55}
be37e860 56
1ddd0d1f
CE
57// Final part
58module x_end_idler(){
59 mirror([0,1,0]) difference(){
60 x_end_idler_base();
61 x_end_idler_holes();
62 }
63
50a95463
CE
64 // fixme: 10 is another magic number, thickness of the wall which is not guaranteed to be static
65 %mirror ([0, 1, 0]) translate([x_base_back() + 10, pulley_mount_y, pulley_mount_z]) rotate([0, 90, 0]) intersection () {
66 idler_assy(idler_bearing);
67 cube ([idler_bearing[0]+10, idler_bearing[0]+10, idler_bearing[1]+20],center=true);
68 }
be37e860
CE
69}
70
be37e860 71x_end_idler();
1ddd0d1f 72
be37e860
CE
73if (idler_bearing[3] == 1) { // bearing guides
74 translate([-39, -60 - idler_bearing[0] / 2, 4 - bushing_xy[0]]) rotate([0, 0, 55]) {
75 render() bearing_assy();
76 }
77}