note issues with current rev in code
[clinton/wilson.git] / scad / x-end.scad
CommitLineData
90c10a06
MR
1// PRUSA iteration3
2// X end prototype
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
ab9ebda3
CE
8// todo: make x-end height global and make anything relying implicitly
9// on the height of the x-end use that for positioning.
10
11// bearing height, strain relief (&& maybe make dependent upon the bearing diameter)
12
414eb385
CE
13
14
15// major issues with rev 3
16
17// - motor side screw hole conflicts with switch / other rear mount is
18// inaccessible without removing the leadscrew from the nut
19
20// - New idler anti-pitching ribs are too big (new idler I wasn't
21// using is larger so the existing ones worked fine for that one...)
22// NOTE: new idler is meant for integrated toothed idler...
23
90c10a06 24use <bearing.scad>
ab9ebda3 25include <configuration.scad>
90c10a06 26
7d6b1234 27pushfit_d = smooth_rod_d + 0.25;
618f5b83 28hex_nut_r = 4.75;
90c10a06 29
68868634 30module nut_trap_base () {
ab9ebda3 31 cube(size=[16,21,8],center=true);
68868634
CE
32 translate ([2,0,0]) cylinder(h=8,r=12.5,$fn=50,center=true);
33}
34
35module nut_trap () {
36 union() {
37 // center post of brass nut
38 cylinder(h=12,r=5.45,$fn=50,center=true);
39 // holes for m3 screws in brass nut
ab9ebda3 40 translate(v=[8,0,0]) cylinder(h=12,r=1.8,$fn=20,center=true);
a4366f5f
CE
41 #rotate([0,0,90]) translate(v=[8,0,0]) cylinder(h=12,r=1.8,$fn=20,center=true);
42 rotate([0,0,180]) translate(v=[8,0,0]) cylinder(h=12,r=1.8,$fn=20,center=true);
4cb9a605
CE
43 #rotate([0,0,270]) translate(v=[8,0,0]) cylinder(h=12,r=1.8,$fn=20,center=true);
44 }
68868634
CE
45}
46
90c10a06
MR
47module x_end_base(){
48// Main block
ab9ebda3
CE
49height = x_box_height;
50// TODO: calculate correct translate(y) + cube(y) using size of bearing
51translate(v=[-15,-10,height/2]) cube(size = [17,45,height], center = true);
90c10a06
MR
52// Bearing holder
53 vertical_bearing_base();
54//Nut trap
ab9ebda3 55 translate(v=[-4-zmotor_delta_y,-17-zmotor_delta_x,4]) nut_trap_base ();
90c10a06 56 // Cube
68868634 57// #translate(v=[-2-2,-17,4]) cube(size = [8,16,8], center = true);
90c10a06 58 // Hexagon
68868634 59// #translate(v=[0,-17,0]) rotate([0,0,30]) cylinder(h = 8, r=8, $fn = 6);
90c10a06
MR
60}
61
62module x_end_holes(){
63 vertical_bearing_holes();
618f5b83
MR
64 // Belt hole
65 translate(v=[-1,0,0]){
66 // Stress relief
d81ed5a5 67 translate(v=[-5.5-10+1.5,-bearing_diameter/2-4,30]) cube(size = [20,1,28], center = true);
ab9ebda3 68 // Cut out for belt (this is NOT centered because the motor isn't centered)
618f5b83 69 difference(){
90c10a06
MR
70 translate(v=[-5.5-10+1.5,-10,30]) cube(size = [10,46,28], center = true);
71
90c10a06
MR
72 // Nice edges
73 translate(v=[-5.5-10+1.5,-10,30+23]) rotate([0,45,0]) cube(size = [10,46,28], center = true);
74 translate(v=[-5.5-10+1.5,-10,30+23]) rotate([0,-45,0]) cube(size = [10,46,28], center = true);
75 translate(v=[-5.5-10+1.5,-10,30-23]) rotate([0,45,0]) cube(size = [10,46,28], center = true);
76 translate(v=[-5.5-10+1.5,-10,30-23]) rotate([0,-45,0]) cube(size = [10,46,28], center = true);
77
78}
79}
80
81
ab9ebda3 82 pushrod_extra_z = 2.5;
90c10a06 83// Bottom pushfit rod
ab9ebda3 84#translate(v=[-15,-41.5,smooth_rod_d/2+pushrod_extra_z]) rotate(a=[-90,0,0]) pushfit_rod(pushfit_d,50);
90c10a06 85// Top pushfit rod
ab9ebda3 86translate(v=[-15,-41.5,rod_distance+smooth_rod_d/2+pushrod_extra_z]) rotate(a=[-90,0,0]) pushfit_rod(pushfit_d,50);
90c10a06 87// Nut trap
a4366f5f 88translate(v=[-zmotor_delta_y,-17-zmotor_delta_x,3]) rotate ([0, 0, 45]) nut_trap ();
68868634
CE
89// #translate(v=[0,-17,-0.5]) cylinder(h = 4, r1=3.4, r2=2.9, $fn=25);
90// translate(v=[0,-17,3]) rotate([0,0,30]) cylinder(h = 10, r=hex_nut_r, $fn = 6);
90c10a06
MR
91}
92
93
94// Final prototype
95module x_end_plain(){
96 difference(){
97 x_end_base();
98 x_end_holes();
99 }
100}
101
102x_end_plain();
103
104
105module pushfit_rod(diameter,length){
0f2032d7
MR
106 translate([0,-0.3,0]) cylinder(h = length, r=diameter/2, $fn=30);
107 translate([0,0.3,0]) cylinder(h = length, r=diameter/2, $fn=30);
108// difference(){
109// translate(v=[0,-diameter/2.85,length/2]) rotate([0,0,45]) cube(size = [diameter/2,diameter/2,length], center = true);
110// translate(v=[0,-diameter/4-diameter/2-0.4,length/2]) rotate([0,0,0]) cube(size = [diameter,diameter/2,length], center = true);
111// }
112
90c10a06
MR
113}
114