Integrate Wilson II features into x-ends
[clinton/wilson.git] / scad / y-end-motor.scad
1 //
2 // Parametric single-piece y ends for Reprap Wilson
3 // GNU GPL v3
4 // by Martin Rice <mrice411@gmail.com>
5 //
6 include <configuration.scad>
7
8 washer_recess = 2; // recesses the washer into the outer side of the end.
9 motor_face_x_offs = 78; // distance from corner to the face of the stepper motor
10 fan_hole = 1;
11 strengthen_around_fan = 1; // adds block behind fan for extra stiffness
12 brace_h = 41;
13 want_endstop_mount = 1; // set to zero if you don't want it!
14 fan_depth = 10; // if this is greater than 10mm, be sure to add strengthen from above.
15 end_w = 193.5;
16 tie_wrap_extra = 1;
17
18 //endpost();
19 yend_motor();
20
21 module yend_motor()
22 {
23 difference() {
24 union() {
25 // thin base under the end (optional)
26 bigbase();
27 // first corner
28 endpost();
29 // second corner
30 translate([end_w,0,0]) scale([-1,1,1]) endpost();
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
53 // bevels on outer corners
54 translate([-1,-23/2,-1]) rotate([0,0,45]) cube([10,10,90]);
55 translate([end_w+1,-23/2,-1]) rotate([0,0,45]) cube([10,10,90]);
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
79 module endpost()
80 {
81 difference() {
82 union() {
83 difference() {
84 cube([23,16,height_of_post]);
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);
86 }
87
88 difference() {
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);
90 translate([0,0,height_of_post]) cube([23,16,10]);
91 }
92 }
93
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);
97 }
98
99 }
100
101 module bigbase()
102 {
103 intersection() {
104 cube([193.5,55,2]);
105 translate([end_w/2,-85,-1]) cylinder(r=140,h=9,$fn=50);
106 }
107 }
108
109 module 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
120 module smallbrace()
121 {
122 smallbrace_h = brace_h;
123
124 cube([11.2,16,smallbrace_h]);
125 }
126
127
128