Преглед изворни кода

add bearings to y-carriages and draw belts with proper length

Thomas Buck пре 6 година
родитељ
комит
1668c75931
3 измењених фајлова са 35 додато и 26 уклоњено
  1. 10
    3
      lib/bearing_idler.scad
  2. 19
    12
      lib/linear_bearing.scad
  3. 6
    11
      xyRepRap.scad

+ 10
- 3
lib/bearing_idler.scad Прегледај датотеку

@@ -74,12 +74,19 @@ module bearing_idler() {
74 74
     }
75 75
 }
76 76
 
77
-module bearing_spacer(h = spacer_height, add_dia = 0) {
77
+module bearing_spacer(h = spacer_height, add_dia = 0, remove_dia = 0, enclose = false, enclose_size_add = 0) {
78 78
     $fn = 30;
79
+    siz = bearing_inner + spacer_size_add + add_dia;
79 80
     difference() {
80
-        cylinder(d = bearing_inner + spacer_size_add + add_dia, h = h);
81
+        hull() {
82
+            if (enclose) {
83
+                translate([-siz / 2, -(siz + enclose_size_add) / 2, 0])
84
+                    cube([siz, siz + enclose_size_add, 1]);
85
+            }
86
+            cylinder(d = siz, h = h);
87
+        }
81 88
         translate([0, 0, -1])
82
-            cylinder(d = bearing_inner + dia_off, h = h + 2);
89
+            cylinder(d = bearing_inner + dia_off - remove_dia, h = h + 2);
83 90
     }
84 91
 }
85 92
 

+ 19
- 12
lib/linear_bearing.scad Прегледај датотеку

@@ -31,6 +31,14 @@ x_rail_cutout_y = x_rail_dist - (2 * y_carriage_len_add);
31 31
 x_rail_hole_off = 5;
32 32
 x_rail_block_len = (y_carriage_length - x_rail_cutout_y) / 2;
33 33
 
34
+draw_y_carriage = false;
35
+draw_rail_len = 100;
36
+
37
+idler_a_blue = [  19,               15,  5.5];
38
+idler_a_red  = [  19, x_rail_dist + 15, 12.5];
39
+idler_b_blue = [30.3, x_rail_dist + 15, 12.5];
40
+idler_b_red  = [30.3,               15,  5.5];
41
+
34 42
 module lm8uu() {
35 43
     $fn = 15;
36 44
     difference() {
@@ -40,12 +48,12 @@ module lm8uu() {
40 48
     }
41 49
 }
42 50
 
43
-// TODO add cable tie lm8uu mounting
51
+// TODO add cable tie canal for lm8uu mounting
44 52
 
45 53
 module generate_spacer(pos) {
46 54
     color("green")
47 55
     translate([pos[0], pos[1], -0.5])
48
-        bearing_spacer(pos[2] + 0.5 + ((idler_outer_height - bearing_height) / 2), 2);
56
+        bearing_spacer(pos[2] + 0.5 + ((idler_outer_height - bearing_height) / 2), 2, 1, true, 3);
49 57
 }
50 58
 
51 59
 module y_carriage(idler_a = [0, 0, 0], idler_b = [0, 0, 0]) {
@@ -124,20 +132,19 @@ module y_carriage(idler_a = [0, 0, 0], idler_b = [0, 0, 0]) {
124 132
     
125 133
     // idlers for the corexy belts
126 134
     translate([0, 0, y_carriage_wall]) {
127
-        translate(idler_a)
128
-            bearing_idler();
129
-        
130
-        translate(idler_b)
131
-            bearing_idler();
135
+        if (!draw_y_carriage) {
136
+            translate(idler_a)
137
+                bearing_idler();
138
+            
139
+            translate(idler_b)
140
+                bearing_idler();
141
+        }
132 142
         
133 143
         generate_spacer(idler_a);
134 144
         generate_spacer(idler_b);
135 145
     }
136 146
 }
137 147
 
138
-draw_y_carriage = false;
139
-draw_rail_len = 100;
140
-
141 148
 if (draw_y_carriage) {
142 149
     translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
143 150
     rotate([-90, 0, 0]) {
@@ -155,9 +162,9 @@ if (draw_y_carriage) {
155 162
             cylinder(d = lm8uu_inner, h = draw_rail_len);
156 163
     }
157 164
 
158
-    y_carriage([15, 15, 10], [10, 65, 2]);
165
+    y_carriage(idler_a_blue, idler_b_blue);
159 166
 
160 167
     translate([(2 * y_carriage_width + y_carriage_block_width) + draw_rail_len -5, y_carriage_length, 0])
161 168
         rotate([0, 0, 180])
162
-        y_carriage([15, 15, 10], [10, 65, 2]);
169
+        y_carriage(idler_a_red, idler_b_red);
163 170
 }

+ 6
- 11
xyRepRap.scad Прегледај датотеку

@@ -222,11 +222,6 @@ module frame() {
222 222
 rail_mount_dist = 12;
223 223
 y_carriage_pos = 175;
224 224
 
225
-idler_a_blue = [  19, 15,  5.5];
226
-idler_a_red  = [  19, 65, 12.5];
227
-idler_b_blue = [30.3, 65, 12.5];
228
-idler_b_red  = [30.3, 15,  5.5];
229
-
230 225
 module rail(length) {
231 226
     cylinder(d = rail_dia, h = length);
232 227
     echo(rail_dia=rail_dia, rail_len=length);
@@ -311,7 +306,7 @@ module motion_xy() {
311 306
         color("blue")
312 307
         translate([nema17_size / 2, nema17_size / 2 + 6.5, nema17_mount_wall + 1])
313 308
         rotate([0, 0, 180])
314
-            gt2_belt(200);
309
+            gt2_belt(outer_length - (5 * slot) - y_carriage_pos);
315 310
         color("blue")
316 311
         translate([-outer_length + (3 * slot) + 10 + nema17_size / 2, nema17_size / 2 - 6.5, nema17_mount_wall + 1])
317 312
             gt2_belt(outer_length - (3 * slot) - 10);
@@ -338,8 +333,8 @@ module motion_xy() {
338 333
         rotate([0, 0, 180])
339 334
             gt2_belt(outer_length - (3 * slot) - 10);
340 335
         color("red")
341
-        translate([-200 + nema17_size / 2, nema17_size / 2 - 6.5, nema17_mount_wall + 8])
342
-            gt2_belt(200);
336
+        translate([nema17_size / 2 - (outer_length - (5 * slot) - y_carriage_pos), nema17_size / 2 - 6.5, nema17_mount_wall + 8])
337
+            gt2_belt(outer_length - (5 * slot) - y_carriage_pos);
343 338
     }
344 339
     
345 340
     // long back belts
@@ -354,13 +349,13 @@ module motion_xy() {
354 349
     color("blue")
355 350
     translate([outer_width - slot - 15, slot + 10, outer_height - 7])
356 351
         rotate([0, 0, 90])
357
-        gt2_belt(200);
352
+        gt2_belt(y_carriage_pos + 10);
358 353
     
359 354
     // red belt on blue side
360 355
     color("red")
361
-    translate([slot + 15, slot + 209, outer_height - 14])
356
+    translate([slot + 15, slot + 19 + y_carriage_pos, outer_height - 14])
362 357
         rotate([0, 0, -90])
363
-        gt2_belt(200);
358
+        gt2_belt(y_carriage_pos + 10);
364 359
     
365 360
     // idler on blue side
366 361
     translate([slot + bearing_mount_width + 15, 0, outer_height - slot])

Loading…
Откажи
Сачувај