note issues with current rev in code
[clinton/wilson.git] / scad / y-end-motor.scad
CommitLineData
1873788a
MR
1//
2// Parametric single-piece y ends for Reprap Wilson
3// GNU GPL v3
4// by Martin Rice <mrice411@gmail.com>
5//
6include <configuration.scad>
7
8washer_recess = 2; // recesses the washer into the outer side of the end.
9motor_face_x_offs = 78; // distance from corner to the face of the stepper motor
10fan_hole = 1;
11strengthen_around_fan = 1; // adds block behind fan for extra stiffness
12brace_h = 41;
13want_endstop_mount = 1; // set to zero if you don't want it!
14fan_depth = 10; // if this is greater than 10mm, be sure to add strengthen from above.
ff8dfc71
MR
15end_w = 193.5;
16tie_wrap_extra = 1;
1873788a
MR
17
18//endpost();
19yend_motor();
20
21module yend_motor()
22{
23 difference() {
24 union() {
25 // thin base under the end (optional)
26 bigbase();
27 // first corner
28 endpost();
29 // second corner
ff8dfc71 30 translate([end_w,0,0]) scale([-1,1,1]) endpost();
1873788a
MR
31 // motor and fan mount
32 translate([motor_face_x_offs,0,0]) translate([-60,42.52,-3]) rotate([0,0,-89.4]) import("i3rsubmotor_fixed.stl");
33
34 // connecting braces
35 translate([88+53,-3,0]) cube([29.5,19,brace_h]);
36 translate([88,0,0]) brace();
37 translate([23,0,0]) smallbrace();
38
39 if(strengthen_around_fan) {
40 translate([25+9.2,-5-(fan_depth-10),0]) cube([54,6+(fan_depth-10),brace_h]);
41 }
42
43 if(want_endstop_mount) {
44 translate([157,3,brace_h-1]) {
45 cube([4,13,20]);
46 translate([0,10,0]) rotate([0,0,90]) cube([3,5,20]);
47 }
48
49 }
50
51 }
52
ff8dfc71 53 // bevels on outer corners
1873788a 54 translate([-1,-23/2,-1]) rotate([0,0,45]) cube([10,10,90]);
ff8dfc71 55 translate([end_w+1,-23/2,-1]) rotate([0,0,45]) cube([10,10,90]);
1873788a
MR
56 translate([43,21,-1]) cube([32,30,10]);
57
58 // fancy big cutout
59 translate([88+23+(fan_depth-10)/5,-45.4-(fan_depth-10)/3,-1]) cylinder(r=52,h=brace_h+10,$fn=100);
60
61 // fan cutout for bigger fans
62 #translate([25+13,4+10-fan_depth,1]) cube([40,fan_depth+.5,40]);
63
64 // fan vent cutout
65 if(fan_hole) translate([23+23.7+11.2,5,20]) rotate([90,0,0]) cylinder(r=19,h=40,$fn=6);
66
67 if(want_endstop_mount) {
68 #translate([160,3,brace_h]) {
69 translate([1.1,0,1]) cube([6,15,20]); // endstop for visualization
70 translate([-5,6.5,5]) #rotate([0,90,0]) rotate([0,0,30]) cylinder(r=1.8,h=10); // mount hole
71 translate([-5,6.5,15]) #rotate([0,90,0]) rotate([0,0,30]) cylinder(r=1.8,h=10); // mount hole
72 }
73
74 }
75 }
76}
77
78
79module endpost()
80{
81 difference() {
82 union() {
83 difference() {
84 cube([23,16,height_of_post]);
ff8dfc71 85 #translate([23/2,7,height_of_post]) rotate([-90,0,0]) cylinder(r=smooth_rod_d/2+2+tie_wrap_t+tie_wrap_extra,h=tie_wrap_w);
1873788a
MR
86 }
87
88 difference() {
ff8dfc71 89 translate([23/2,7,height_of_post]) rotate([-90,0,0]) cylinder(r=smooth_rod_d/2+2+tie_wrap_extra,h=tie_wrap_w);
1873788a
MR
90 translate([0,0,height_of_post]) cube([23,16,10]);
91 }
92 }
93
ff8dfc71
MR
94 translate([23/2,-10,height_of_threaded ]) rotate([-90,0,0]) cylinder(r=threaded_rod_d/2+.4,h=380);
95 translate([23/2,-.1,height_of_threaded ]) rotate([-90,0,0]) cylinder(r=washer_d/2+.4,h=washer_recess);
96 translate([23/2,2.5,height_of_smooth]) rotate([-90,0,0]) cylinder(r=smooth_rod_d/2+.1,h=380);
1873788a
MR
97 }
98
99}
100
101module bigbase()
102{
103 intersection() {
104 cube([193.5,55,2]);
ff8dfc71 105 translate([end_w/2,-85,-1]) cylinder(r=140,h=9,$fn=50);
1873788a
MR
106 }
107}
108
109module brace()
110{
111
112 difference() {
113 translate([0,-3,0]) cube([53,19,brace_h]);
114 //translate([25,-45.4,-1]) cylinder(r=52,h=brace_h+2,$fn=100);
115 translate([25,61.5,-1]) cylinder(r=52,h=brace_h+2,$fn=100);
116 }
117
118}
119
120module smallbrace()
121{
122 smallbrace_h = brace_h;
123
124 cube([11.2,16,smallbrace_h]);
125}
126
127
128