Browse Source

Renamed filed and moved stuff around. Started with Z-Motion.

Thomas Buck 6 years ago
parent
commit
3bbe2d6394
4 changed files with 524 additions and 233 deletions
  1. 64
    109
      lib/carriages_xy.scad
  2. 267
    0
      lib/linear_rail.scad
  3. 0
    79
      lib/rail_mount.scad
  4. 193
    45
      xyRepRap.scad

lib/linear_bearing.scad → lib/carriages_xy.scad View File

@@ -1,22 +1,22 @@
1 1
 
2 2
 include <bearing_idler.scad>
3
+include <linear_rail.scad>
3 4
 include <e3d_v6_all_metall_hotend.scad>
4 5
 
5 6
 // #######################################################
6
-// ################### Linear Bearings ###################
7
+// #################### X-Y Carriages ####################
7 8
 // #######################################################
8 9
 
9
-lm8uu_outer = 15;
10
-lm8uu_inner = 8;
11
-lm8uu_height = 24;
12
-lm8luu_height = 45;
10
+x_rail_dia = 10;
11
+y_rail_dia = 12;
13 12
 
14 13
 x_rail_dist = 70;
15 14
 
16
-lm8uu_dia_add = 0.5;
17
-lm8uu_len_add = 1.0;
15
+lmXuu_dia_add = 0.5;
16
+lmXuu_len_add = 1.0;
18 17
 rail_dia_add = 3.0;
19
-y_carriage_wall = 10; // z-axis
18
+
19
+y_carriage_wall = 2 + y_rail_dia; // z-axis
20 20
 y_carriage_len_add = 15; // y-axis
21 21
 y_carriage_width = 25; // x-axis
22 22
 y_carriage_block_width = 10; // x-axis
@@ -56,10 +56,10 @@ x_cutout_width = x_carriage_width - (2 * x_carriage_belt_block_width) - 5;
56 56
 x_cutout_length = x_rail_dist - 25;
57 57
 
58 58
 // y-carriage belt idlers
59
-idler_a_blue = [  19,               15,  5.5];
60
-idler_a_red  = [  19, x_rail_dist + 15, 12.5];
61
-idler_b_blue = [30.3, x_rail_dist + 15, 12.5];
62
-idler_b_red  = [30.3,               15,  5.5];
59
+idler_a_blue = [  19,               15,  5.5 - (y_rail_dia - 8)];
60
+idler_a_red  = [  19, x_rail_dist + 15, 12.5 - (y_rail_dia - 8)];
61
+idler_b_blue = [30.3, x_rail_dist + 15, 12.5 - (y_rail_dia - 8)];
62
+idler_b_red  = [30.3,               15,  5.5 - (y_rail_dia - 8)];
63 63
 
64 64
 e3d_v6_dist_x = 23 + 5;
65 65
 e3d_v6_dist_y = 18 + 1;
@@ -98,19 +98,15 @@ sensor_dia_add = 6;
98 98
 
99 99
 sensor_mount_width = (2 * universal_mount_hole_off) + sensor_mount_width_add;
100 100
 
101
-cable_tie_width = 3.5;
102
-cable_tie_height = 2.0;
103
-cable_tie_dia_add = 1.0;
104
-
105 101
 draw_x_carriage = false;
106
-draw_e3d_fan_duct = true;
107
-draw_radial_fan = true;
108
-draw_bed_sensor = true;
109
-draw_e3d_hotends = true;
102
+draw_e3d_fan_duct = false;
103
+draw_radial_fan = false;
104
+draw_bed_sensor = false;
105
+draw_e3d_hotends = false;
110 106
 
111 107
 draw_y_carriage = false;
112 108
 draw_y_carriage_idlers = true;
113
-draw_rail_len = 200;
109
+draw_rail_len = 220;
114 110
 
115 111
 print_x_carriage = false;
116 112
 print_x_carriage_clamps = false;
@@ -133,45 +129,13 @@ module nut_cut() {
133 129
     }
134 130
 }
135 131
 
136
-module lm8uu() {
137
-    $fn = 15;
138
-    difference() {
139
-        cylinder(d = lm8uu_outer, h = lm8uu_height);
140
-        translate([0, 0, -1])
141
-            cylinder(d = lm8uu_inner, h = lm8uu_height + 2);
142
-    }
143
-}
144
-
145
-module lm8luu() {
146
-    $fn = 15;
147
-    difference() {
148
-        cylinder(d = lm8uu_outer, h = lm8luu_height);
149
-        translate([0, 0, -1])
150
-            cylinder(d = lm8uu_inner, h = lm8luu_height + 2);
151
-    }
152
-}
153
-
154
-module lm8uu_cable_tie() {
155
-    difference() {
156
-        union() {
157
-            cylinder(d = lm8uu_outer + (2 * (cable_tie_height + cable_tie_dia_add)), h = cable_tie_width);
158
-            
159
-            translate([-8.5, 6, 0])
160
-                cube([17, 10, cable_tie_width]);
161
-        }
162
-        
163
-        translate([0, 0, -1])
164
-            cylinder(d = lm8uu_outer + (2 * cable_tie_dia_add), h = cable_tie_width + 2);
165
-    }
166
-}
167
-
168 132
 module generate_spacer(pos) {
169 133
     color("green")
170 134
     translate([pos[0], pos[1], -0.5])
171 135
         bearing_spacer(pos[2] + 0.5 + ((idler_outer_height - bearing_height) / 2), 2, 1, true, 3);
172 136
 }
173 137
 
174
-module y_carriage(idler_a = [0, 0, 0], idler_b = [0, 0, 0], block = true, clamp = true) {
138
+module y_carriage(x_rail_dia, y_rail_dia, idler_a = [0, 0, 0], idler_b = [0, 0, 0], block = true, clamp = true) {
175 139
     $fn = 20;
176 140
     
177 141
     // attaching to x-rails
@@ -221,7 +185,7 @@ module y_carriage(idler_a = [0, 0, 0], idler_b = [0, 0, 0], block = true, clamp
221 185
         for (i = [y_carriage_len_add : x_rail_dist : x_rail_dist + y_carriage_len_add]) {
222 186
             translate([0, i, y_carriage_block_height])
223 187
                 rotate([0, 90, 0])
224
-                cylinder(d = lm8uu_inner + rail_mount_dia_add, h = y_carriage_block_width + 1);
188
+                cylinder(d = x_rail_dia + rail_mount_dia_add, h = y_carriage_block_width + 1);
225 189
         }
226 190
         
227 191
         for (i = [0 : x_rail_block_len + x_rail_cutout_y : x_rail_block_len + x_rail_cutout_y]) {
@@ -252,43 +216,43 @@ module y_carriage(idler_a = [0, 0, 0], idler_b = [0, 0, 0], block = true, clamp
252 216
                 cube([y_carriage_block_width, y_carriage_length, y_carriage_block_height]);
253 217
         }
254 218
         
255
-        translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
219
+        translate([(lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
256 220
         rotate([-90, 0, 0]) {
257 221
             translate([0, 0, -1])
258
-                cylinder(d = lm8uu_inner + rail_dia_add, h = y_carriage_length + 2);
222
+                cylinder(d = y_rail_dia + rail_dia_add, h = y_carriage_length + 2);
259 223
             
260
-            translate([0, 0, y_carriage_rail_support - lm8uu_len_add / 2])
261
-                cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add);
224
+            translate([0, 0, y_carriage_rail_support - lmXuu_len_add / 2])
225
+                cylinder(d = lmXuu_outer(y_rail_dia) + lmXuu_dia_add, h = lmXuu_height(y_rail_dia) + lmXuu_len_add);
262 226
         
263
-            translate([0, 0, y_carriage_length - lm8uu_height - y_carriage_rail_support - lm8uu_len_add / 2])
264
-                cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add);
227
+            translate([0, 0, y_carriage_length - lmXuu_height(y_rail_dia) - y_carriage_rail_support - lmXuu_len_add / 2])
228
+                cylinder(d = lmXuu_outer(y_rail_dia) + lmXuu_dia_add, h = lmXuu_height(y_rail_dia) + lmXuu_len_add);
265 229
         }
266 230
         
267
-        translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
231
+        translate([(lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
268 232
         rotate([90, 0, 0]) {
269 233
             translate([0, 0, -11])
270
-                lm8uu_cable_tie();
234
+                lmXuu_cable_tie(y_rail_dia);
271 235
             
272 236
             translate([0, 0, -20])
273
-                lm8uu_cable_tie();
237
+                lmXuu_cable_tie(y_rail_dia);
274 238
             
275 239
             translate([0, 0, -83])
276
-                lm8uu_cable_tie();
240
+                lmXuu_cable_tie(y_rail_dia);
277 241
             
278 242
             translate([0, 0, -92])
279
-                lm8uu_cable_tie();
243
+                lmXuu_cable_tie(y_rail_dia);
280 244
         }
281 245
     }
282 246
     
283 247
     if (block)
284 248
     color("magenta")
285
-    translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
249
+    translate([(lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
286 250
     rotate([-90, 0, 0]) {
287 251
         // y-bearings
288 252
         %translate([0, 0, y_carriage_rail_support])
289
-            lm8uu();
290
-        %translate([0, 0, y_carriage_length - lm8uu_height - y_carriage_rail_support])
291
-            lm8uu();
253
+            lmXuu(y_rail_dia);
254
+        %translate([0, 0, y_carriage_length - lmXuu_height(y_rail_dia) - y_carriage_rail_support])
255
+            lmXuu(y_rail_dia);
292 256
     }
293 257
 }
294 258
 
@@ -382,7 +346,7 @@ module belt_mounts(block=true, clamp=true) {
382 346
         belt_mount(false, false, block, clamp);
383 347
 }
384 348
 
385
-module x_carriage(with_body=true, with_tool=true, with_clamps=true, with_fan=true, with_cool=true, with_sensor=true) {
349
+module x_carriage(x_rail_dia, with_body=true, with_tool=true, with_clamps=true, with_fan=true, with_cool=true, with_sensor=true) {
386 350
     $fn = 20;
387 351
      
388 352
     if (!with_body) {
@@ -409,62 +373,62 @@ module x_carriage(with_body=true, with_tool=true, with_clamps=true, with_fan=tru
409 373
             cube([x_cutout_width, x_cutout_length, x_carriage_wall + 2], center=true);
410 374
         
411 375
         for (i = [0 : 1 : 1]) {
412
-            translate([lm8uu_height + x_carriage_bearing_off + (i * (x_carriage_width - (2 * x_carriage_bearing_off) - lm8uu_height)), 0, ])
376
+            translate([lmXuu_height(x_rail_dia) + x_carriage_bearing_off + (i * (x_carriage_width - (2 * x_carriage_bearing_off) - lmXuu_height(x_rail_dia))), 0, ])
413 377
             rotate([0, -90, 0]) {
414 378
                 // x-bearings
415 379
                 color("magenta")
416 380
                 %translate([0, x_carriage_len_add, 0])
417
-                    lm8uu();
381
+                    lmXuu(x_rail_dia);
418 382
                 
419 383
                 color("magenta")
420 384
                 %translate([0, x_rail_dist + x_carriage_len_add, 0])
421
-                    lm8uu();
385
+                    lmXuu(x_rail_dia);
422 386
                 
423 387
                 color("green")
424 388
                 translate([0, x_carriage_len_add, 0])
425
-                    cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add);
389
+                    cylinder(d = lmXuu_outer(x_rail_dia) + lmXuu_dia_add, h = lmXuu_height(x_rail_dia) + lmXuu_len_add);
426 390
                 
427 391
                 color("green")
428 392
                 translate([0, x_rail_dist + x_carriage_len_add, 0])
429
-                    cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add);
393
+                    cylinder(d = lmXuu_outer(x_rail_dia) + lmXuu_dia_add, h = lmXuu_height(x_rail_dia) + lmXuu_len_add);
430 394
                 
431 395
                 color("green")
432 396
                 translate([0, x_carriage_len_add, -x_carriage_width])
433
-                    cylinder(d = lm8uu_inner + rail_dia_add, h = x_carriage_width * 2);
397
+                    cylinder(d = x_rail_dia + rail_dia_add, h = x_carriage_width * 2);
434 398
                 
435 399
                 color("green")
436 400
                 translate([0, x_rail_dist + x_carriage_len_add, -x_carriage_width])
437
-                    cylinder(d = lm8uu_inner + rail_dia_add, h = x_carriage_width * 2);
401
+                    cylinder(d = x_rail_dia + rail_dia_add, h = x_carriage_width * 2);
438 402
             }
439 403
         }
440 404
         
441 405
         // bearing cable tie mount front
442 406
         translate([8, x_carriage_len_add, 0])
443 407
             rotate([90, 0, 90])
444
-            lm8uu_cable_tie();
408
+            lmXuu_cable_tie(x_rail_dia);
445 409
         translate([18, x_carriage_len_add, 0])
446 410
             rotate([90, 0, 90])
447
-            lm8uu_cable_tie();
411
+            lmXuu_cable_tie(x_rail_dia);
448 412
         translate([58, x_carriage_len_add, 0])
449 413
             rotate([90, 0, 90])
450
-            lm8uu_cable_tie();
414
+            lmXuu_cable_tie(x_rail_dia);
451 415
         translate([68, x_carriage_len_add, 0])
452 416
             rotate([90, 0, 90])
453
-            lm8uu_cable_tie();
417
+            lmXuu_cable_tie(x_rail_dia);
454 418
         
455 419
         // bearing cable tie mount back
456 420
         translate([8, x_carriage_len_add + x_rail_dist, 0])
457 421
             rotate([90, 0, 90])
458
-            lm8uu_cable_tie();
422
+            lmXuu_cable_tie(x_rail_dia);
459 423
         translate([18, x_carriage_len_add + x_rail_dist, 0])
460 424
             rotate([90, 0, 90])
461
-            lm8uu_cable_tie();
425
+            lmXuu_cable_tie(x_rail_dia);
462 426
         translate([58, x_carriage_len_add + x_rail_dist, 0])
463 427
             rotate([90, 0, 90])
464
-            lm8uu_cable_tie();
428
+            lmXuu_cable_tie(x_rail_dia);
465 429
         translate([68, x_carriage_len_add + x_rail_dist, 0])
466 430
             rotate([90, 0, 90])
467
-            lm8uu_cable_tie();
431
+            lmXuu_cable_tie(x_rail_dia);
468 432
         
469 433
         /* mounting for hotend / tool */
470 434
         
@@ -868,64 +832,55 @@ module fan_duct(fan_width, diff) {
868 832
 }
869 833
 
870 834
 if (print_x_carriage) {
871
-    x_carriage(true, false, false, false, false, false);
835
+    x_carriage(x_rail_dia, true, false, false, false, false, false);
872 836
 }
873 837
 
874 838
 if (print_x_carriage_clamps) {
875
-    x_carriage(false, false, true, false, false, false);
839
+    x_carriage(x_rail_dia, false, false, true, false, false, false);
876 840
 }
877 841
 
878 842
 if (print_e3d_mount) {
879
-    x_carriage(false, true, false, false, false, false);
843
+    x_carriage(x_rail_dia, false, true, false, false, false, false);
880 844
 }
881 845
 
882 846
 if (print_e3d_fans) {
883
-    x_carriage(false, false, false, true, false, false);
847
+    x_carriage(x_rail_dia, false, false, false, true, false, false);
884 848
 }
885 849
 
886 850
 if (print_fan_mount) {
887
-    x_carriage(false, false, false, false, true, false);
851
+    x_carriage(x_rail_dia, false, false, false, false, true, false);
888 852
 }
889 853
 
890 854
 if (print_sensor_mount) {
891
-    x_carriage(false, false, false, false, false, true);
855
+    x_carriage(x_rail_dia, false, false, false, false, false, true);
892 856
 }
893 857
 
894 858
 if (print_y_carriage_a || print_y_carriage_a_clamps) {
895
-    y_carriage(idler_a_blue, idler_b_blue, print_y_carriage_a, print_y_carriage_a_clamps);
859
+    y_carriage(x_rail_dia, y_rail_dia, idler_a_blue, idler_b_blue, print_y_carriage_a, print_y_carriage_a_clamps);
896 860
 }
897 861
 
898 862
 if (print_y_carriage_b || print_y_carriage_b_clamps) {
899
-    y_carriage(idler_a_red, idler_b_red, print_y_carriage_b, print_y_carriage_b_clamps);
863
+    y_carriage(x_rail_dia, y_rail_dia, idler_a_red, idler_b_red, print_y_carriage_b, print_y_carriage_b_clamps);
900 864
 }
901 865
 
902 866
 if (draw_y_carriage) {
903
-    translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
904
-    rotate([-90, 0, 0]) {
905
-        // y-bearings
906
-        %translate([0, 0, y_carriage_rail_support])
907
-            lm8uu();
908
-        %translate([0, 0, y_carriage_length - lm8uu_height - y_carriage_rail_support])
909
-            lm8uu();
910
-    }
911
-
912 867
     // x-rails
913 868
     for (i = [y_carriage_len_add : x_rail_dist : x_rail_dist + y_carriage_len_add]) {
914 869
         %translate([y_carriage_width + 1, i, 0])
915 870
             rotate([0, 90, 0])
916
-            cylinder(d = lm8uu_inner, h = draw_rail_len);
871
+            cylinder(d = x_rail_dia, h = draw_rail_len);
917 872
     }
918 873
 
919
-    y_carriage(idler_a_blue, idler_b_blue);
874
+    y_carriage(x_rail_dia, y_rail_dia, idler_a_blue, idler_b_blue);
920 875
 
921 876
     translate([(2 * y_carriage_width + y_carriage_block_width) + draw_rail_len -5, y_carriage_length, 0])
922 877
         rotate([0, 0, 180])
923
-        y_carriage(idler_a_red, idler_b_red);
878
+        y_carriage(x_rail_dia, y_rail_dia, idler_a_red, idler_b_red);
924 879
     
925 880
     if (draw_x_carriage) {
926
-        translate([y_carriage_width + y_carriage_block_width + ((draw_rail_len - x_carriage_width) / 2), y_carriage_len_add - x_carriage_len_add, 0])
927
-            x_carriage();
881
+        translate([y_carriage_width + y_carriage_block_width + ((draw_rail_len - x_carriage_width - fan_height) / 2), y_carriage_len_add - x_carriage_len_add, 0])
882
+            x_carriage(x_rail_dia);
928 883
     }
929 884
 } else if (draw_x_carriage) {
930
-    x_carriage();
885
+    x_carriage(x_rail_dia);
931 886
 }

+ 267
- 0
lib/linear_rail.scad View File

@@ -0,0 +1,267 @@
1
+
2
+// #######################################################
3
+// ################### Linear Bearings ###################
4
+// #######################################################
5
+
6
+lm8uu_outer = 15;
7
+lm8uu_inner = 8;
8
+lm8uu_height = 24;
9
+lm8luu_height = 45;
10
+
11
+// TODO
12
+lm10uu_outer = 19;
13
+lm10uu_inner = 10;
14
+lm10uu_height = 29;
15
+lm10luu_height = 55;
16
+
17
+// TODO
18
+lm12uu_outer = 21;
19
+lm12uu_inner = 12;
20
+lm12uu_height = 30;
21
+lm12luu_height = 57;
22
+
23
+cable_tie_width = 3.5;
24
+cable_tie_height = 2.0;
25
+cable_tie_dia_add = 1.0;
26
+
27
+rail_mount_wall = 5;
28
+rail_mount_len = 10;
29
+rail_mount_block = 22;
30
+rail_y_off_1 = 10;
31
+cutout_width = 0.5;
32
+
33
+draw_rail_mount = false;
34
+draw_bearings = false;
35
+
36
+// #######################################################
37
+
38
+if (draw_rail_mount) {
39
+    rail_mount(30, 8, 10);
40
+    
41
+    translate([20, 20, 0])
42
+        rail_mount(30, 10, 20);
43
+    
44
+    translate([40, 0, 0])
45
+        rail_mount(30, 12, 10);
46
+}
47
+
48
+if (draw_bearings) {
49
+    lm8uu();
50
+    translate([0, 20, 0])
51
+        lm8luu();
52
+    translate([0, 20, 30])
53
+        lm8uu_cable_tie();
54
+    
55
+    translate([25, 0, 0])
56
+        lm10uu();
57
+    translate([25, 25, 0])
58
+        lm10luu();
59
+    translate([25, 25, 30])
60
+        lm10uu_cable_tie();
61
+    
62
+    translate([55, 0, 0])
63
+        lm12uu();
64
+    translate([55, 30, 0])
65
+        lm12luu();
66
+    translate([55, 30, 30])
67
+        lm12uu_cable_tie();
68
+}
69
+
70
+// #######################################################
71
+
72
+function lmXuu_outer(dia) =
73
+    (dia == 8) ? lm8uu_outer :
74
+        ((dia == 10) ? lm10uu_outer :
75
+            ((dia == 12) ? lm12uu_outer : 0));
76
+
77
+function lmXuu_height(dia) =
78
+    (dia == 8) ? lm8uu_height :
79
+        ((dia == 10) ? lm10uu_height :
80
+            ((dia == 12) ? lm12uu_height : 0));
81
+
82
+module lmXuu(dia) {
83
+    if (dia == 8) {
84
+        lm8uu();
85
+    } else if (dia == 10) {
86
+        lm10uu();
87
+    } else if (dia == 12) {
88
+        lm12uu();
89
+    }
90
+}
91
+
92
+module lmXluu(dia) {
93
+    if (dia == 8) {
94
+        lm8luu();
95
+    } else if (dia == 10) {
96
+        lm10luu();
97
+    } else if (dia == 12) {
98
+        lm12luu();
99
+    }
100
+}
101
+
102
+module lmXuu_cable_tie(dia) {
103
+    if (dia == 8) {
104
+        lm8uu_cable_tie();
105
+    } else if (dia == 10) {
106
+        lm10uu_cable_tie();
107
+    } else if (dia == 12) {
108
+        lm12uu_cable_tie();
109
+    }
110
+}
111
+
112
+module lm8uu() {
113
+    $fn = 15;
114
+    difference() {
115
+        cylinder(d = lm8uu_outer, h = lm8uu_height);
116
+        translate([0, 0, -1])
117
+            cylinder(d = lm8uu_inner, h = lm8uu_height + 2);
118
+    }
119
+}
120
+
121
+module lm8luu() {
122
+    $fn = 15;
123
+    difference() {
124
+        cylinder(d = lm8uu_outer, h = lm8luu_height);
125
+        translate([0, 0, -1])
126
+            cylinder(d = lm8uu_inner, h = lm8luu_height + 2);
127
+    }
128
+}
129
+
130
+module lm8uu_cable_tie() {
131
+    difference() {
132
+        union() {
133
+            cylinder(d = lm8uu_outer + (2 * (cable_tie_height + cable_tie_dia_add)), h = cable_tie_width);
134
+            
135
+            translate([-8.5, 6, 0])
136
+                cube([17, 10, cable_tie_width]);
137
+        }
138
+        translate([0, 0, -1])
139
+            cylinder(d = lm8uu_outer + (2 * cable_tie_dia_add), h = cable_tie_width + 2);
140
+    }
141
+}
142
+
143
+
144
+module lm10uu() {
145
+    $fn = 15;
146
+    difference() {
147
+        cylinder(d = lm10uu_outer, h = lm10uu_height);
148
+        translate([0, 0, -1])
149
+            cylinder(d = lm10uu_inner, h = lm10uu_height + 2);
150
+    }
151
+}
152
+
153
+module lm10luu() {
154
+    $fn = 15;
155
+    difference() {
156
+        cylinder(d = lm10uu_outer, h = lm10luu_height);
157
+        translate([0, 0, -1])
158
+            cylinder(d = lm10uu_inner, h = lm10luu_height + 2);
159
+    }
160
+}
161
+
162
+module lm10uu_cable_tie() {
163
+    difference() {
164
+        union() {
165
+            cylinder(d = lm10uu_outer + (2 * (cable_tie_height + cable_tie_dia_add)), h = cable_tie_width);
166
+            
167
+            translate([-8.5, 6, 0])
168
+                cube([17, 10, cable_tie_width]);
169
+        }
170
+        translate([0, 0, -1])
171
+            cylinder(d = lm10uu_outer + (2 * cable_tie_dia_add), h = cable_tie_width + 2);
172
+    }
173
+}
174
+
175
+module lm12uu() {
176
+    $fn = 15;
177
+    difference() {
178
+        cylinder(d = lm12uu_outer, h = lm12uu_height);
179
+        translate([0, 0, -1])
180
+            cylinder(d = lm12uu_inner, h = lm12uu_height + 2);
181
+    }
182
+}
183
+
184
+module lm12luu() {
185
+    $fn = 15;
186
+    difference() {
187
+        cylinder(d = lm12uu_outer, h = lm12luu_height);
188
+        translate([0, 0, -1])
189
+            cylinder(d = lm12uu_inner, h = lm12luu_height + 2);
190
+    }
191
+}
192
+
193
+module lm12uu_cable_tie() {
194
+    difference() {
195
+        union() {
196
+            cylinder(d = lm12uu_outer + (2 * (cable_tie_height + cable_tie_dia_add)), h = cable_tie_width);
197
+            
198
+            translate([-8.5, 6, 0])
199
+                cube([17, 10, cable_tie_width]);
200
+        }
201
+        translate([0, 0, -1])
202
+            cylinder(d = lm12uu_outer + (2 * cable_tie_dia_add), h = cable_tie_width + 2);
203
+    }
204
+}
205
+
206
+// #######################################################
207
+
208
+module rail_mount(slot, dia, rail_mount_len = rail_mount_len) {
209
+    $fn = 20;
210
+    
211
+    rail_mount_height = rail_y_off_1 + dia;
212
+    
213
+    echo(rail_mount_len=rail_mount_len, rail_dia=dia);
214
+    
215
+    difference() {
216
+        union() {
217
+            // main body
218
+            cube([rail_mount_wall, rail_mount_len, 2 * slot]);
219
+            
220
+            // rail clamp
221
+            translate([rail_mount_wall, 0, ((2 * slot) - rail_mount_block ) / 2])
222
+                cube([rail_mount_height, rail_mount_len, rail_mount_block]);
223
+        }
224
+
225
+        // M4 slot mounting holes
226
+        translate([-1, rail_mount_len / 2, slot / 2])
227
+            rotate([0, 90, 0])
228
+            cylinder(d = 4.2, h = rail_mount_wall + 2);
229
+        translate([-1, rail_mount_len / 2, slot * 3 / 2])
230
+            rotate([0, 90, 0])
231
+            cylinder(d = 4.2, h = rail_mount_wall + 2);
232
+        
233
+        translate([dia / 2 + rail_y_off_1, -1, slot])
234
+            rotate([-90, 0, 0])
235
+            cylinder(d = dia + 0.1, h = rail_mount_len + 2);
236
+        
237
+        // clamping cutout
238
+        translate([rail_y_off_1 + (dia - cutout_width) / 2, -1, ((2 * slot) - (rail_mount_block + 2)) / 2])
239
+            cube([cutout_width, rail_mount_len + 2, rail_mount_block + 2]);
240
+        
241
+        translate([-1, rail_mount_len / 2, slot + rail_mount_block / 3])
242
+        rotate([0, 90, 0]) {
243
+            cylinder(d = 3.2, h = rail_mount_height + rail_mount_wall + 2);
244
+            
245
+            cylinder(d = 6.1, h = 3.8, $fn = 6);
246
+            
247
+            translate([0, 0, rail_mount_height + rail_mount_wall -2.5])
248
+                cylinder(d = 6.1, h = 3.8);
249
+        }
250
+        
251
+        translate([-1, rail_mount_len / 2, slot - rail_mount_block / 3])
252
+        rotate([0, 90, 0]) {
253
+            cylinder(d = 3.2, h = rail_mount_height + rail_mount_wall + 2);
254
+            
255
+            cylinder(d = 6.1, h = 3.8, $fn = 6);
256
+            
257
+            translate([0, 0, rail_mount_height + rail_mount_wall -2.5])
258
+                cylinder(d = 6.1, h = 3.8);
259
+        }
260
+        
261
+        translate([-10, -10, -22])
262
+            cube([30, rail_mount_len + 20, 30]);
263
+        
264
+        translate([-10, -10, 2 * slot - 8])
265
+            cube([30, rail_mount_len + 20, 30]);
266
+    }
267
+}

+ 0
- 79
lib/rail_mount.scad View File

@@ -1,79 +0,0 @@
1
-
2
-// #######################################################
3
-// ###################### Mechanics ######################
4
-// #######################################################
5
-
6
-rail_mount_wall = 5;
7
-rail_mount_len = 10;
8
-rail_mount_block = 22;
9
-rail_dia = 8;
10
-rail_y_off_1 = 10;
11
-cutout_width = 0.5;
12
-
13
-rail_mount_height = rail_y_off_1 + 6;
14
-rail_y_off = rail_dia / 2 + rail_y_off_1;
15
-
16
-draw_rail_mount = false;
17
-    
18
-// #######################################################
19
-
20
-if (draw_rail_mount) rail_mount(30, 20);
21
-
22
-module rail_mount(slot, rail_mount_len = rail_mount_len) {
23
-    $fn = 20;
24
-    
25
-    echo(rail_mount_len=rail_mount_len);
26
-    
27
-    difference() {
28
-        union() {
29
-            // main body
30
-            cube([rail_mount_wall, rail_mount_len, 2 * slot]);
31
-            
32
-            // rail clamp
33
-            translate([rail_mount_wall, 0, ((2 * slot) - rail_mount_block ) / 2])
34
-                cube([rail_mount_height, rail_mount_len, rail_mount_block]);
35
-        }
36
-
37
-        // M4 slot mounting holes
38
-        translate([-1, rail_mount_len / 2, slot / 2])
39
-            rotate([0, 90, 0])
40
-            cylinder(d = 4.2, h = rail_mount_wall + 2);
41
-        translate([-1, rail_mount_len / 2, slot * 3 / 2])
42
-            rotate([0, 90, 0])
43
-            cylinder(d = 4.2, h = rail_mount_wall + 2);
44
-        
45
-        translate([rail_dia / 2 + rail_y_off_1, -1, slot])
46
-            rotate([-90, 0, 0])
47
-            cylinder(d = rail_dia + 0.1, h = rail_mount_len + 2);
48
-        
49
-        // clamping cutout
50
-        translate([rail_y_off_1 + (rail_dia - cutout_width) / 2, -1, ((2 * slot) - (rail_mount_block + 2)) / 2])
51
-            cube([cutout_width, rail_mount_len + 2, rail_mount_block + 2]);
52
-        
53
-        translate([-1, rail_mount_len / 2, slot + rail_mount_block / 3])
54
-        rotate([0, 90, 0]) {
55
-            cylinder(d = 3.2, h = rail_mount_height + rail_mount_wall + 2);
56
-            
57
-            cylinder(d = 6.1, h = 3.8, $fn = 6);
58
-            
59
-            translate([0, 0, rail_mount_height + rail_mount_wall -2.5])
60
-                cylinder(d = 6.1, h = 3.8);
61
-        }
62
-        
63
-        translate([-1, rail_mount_len / 2, slot - rail_mount_block / 3])
64
-        rotate([0, 90, 0]) {
65
-            cylinder(d = 3.2, h = rail_mount_height + rail_mount_wall + 2);
66
-            
67
-            cylinder(d = 6.1, h = 3.8, $fn = 6);
68
-            
69
-            translate([0, 0, rail_mount_height + rail_mount_wall -2.5])
70
-                cylinder(d = 6.1, h = 3.8);
71
-        }
72
-        
73
-        translate([-10, -10, -22])
74
-            cube([30, rail_mount_len + 20, 30]);
75
-        
76
-        translate([-10, -10, 2 * slot - 8])
77
-            cube([30, rail_mount_len + 20, 30]);
78
-    }
79
-}

+ 193
- 45
xyRepRap.scad View File

@@ -13,8 +13,8 @@ heatbed_length = 400;
13 13
 heatbed_height = 6;
14 14
 
15 15
 // distance between heatbed edge and inner t-slot frame edge
16
-frame_off_x = 20;
17
-frame_off_y = 20;
16
+frame_off_x = 30;
17
+frame_off_y = 30;
18 18
 
19 19
 outer_width = heatbed_width + (2 * (slot + frame_off_x));
20 20
 outer_length = heatbed_length + (2 * (slot + frame_off_y));
@@ -27,23 +27,31 @@ y_carriage_pos = 175;
27 27
 x_carriage_pos = 180;
28 28
 
29 29
 // distance between heatbed and z-carriage frame
30
-bed_x_off = 20;
31
-bed_y_off = 20;
30
+bed_x_off = 10;
31
+bed_y_off = 10;
32 32
 bed_z_dist = 30;
33 33
 
34 34
 // display heatbed centered in print volume
35 35
 bed_draw_height = (outer_height - heatbed_height) / 2; // + 175;
36 36
 
37
+z_carriage_wall = 10;
38
+z_carriage_bearing_dia_add = 0.4;
39
+z_carriage_cutout_width = 2;
40
+z_carriage_cabletie_cut_off = 5;
41
+z_carriage_use_cable_tie_mount = true;
42
+
43
+z_rail_dia = 8;
44
+
37 45
 show_outer_frame = true;
38 46
 show_extruders = false;
39 47
 show_z_motion = true;
40 48
 
41 49
 show_heatbed_frame = true;
42
-show_heatbed = false;
50
+show_heatbed = true;
43 51
 
44 52
 show_xy_motion = true;
45
-show_x_carriage = false;
46
-show_belts = true;
53
+show_x_carriage = true;
54
+show_belts = false;
47 55
 
48 56
 echo(print_x=heatbed_width, print_y=heatbed_length);
49 57
 echo(frame_x=outer_width, frame_y=outer_length, frame_z=outer_height);
@@ -57,8 +65,8 @@ include <lib/nema.scad>
57 65
 include <lib/Belt_Generator.scad>
58 66
 include <lib/Pulley_T-MXL-XL-HTD-GT2_N-tooth.scad>
59 67
 include <lib/bearing_idler.scad>
60
-include <lib/rail_mount.scad>
61
-include <lib/linear_bearing.scad>
68
+include <lib/linear_rail.scad>
69
+include <lib/carriages_xy.scad>
62 70
 include <lib/extruder.scad>
63 71
 
64 72
 module gt2_belt(length) {
@@ -245,50 +253,50 @@ module frame() {
245 253
 // ###################### Mechanics ######################
246 254
 // #######################################################
247 255
 
248
-module rail(length) {
249
-    cylinder(d = rail_dia, h = length);
250
-    echo(rail_dia=rail_dia, rail_len=length);
256
+module rail(length, dia) {
257
+    cylinder(d = dia, h = length);
258
+    echo(rail_dia=dia, rail_len=length);
251 259
 }
252 260
 
253 261
 module y_rails() {
254 262
     // y smooth rail on blue side
255 263
     color("cyan")
256
-    translate([rail_dia / 2 + rail_y_off_1, 18, -30])
264
+    translate([y_rail_dia / 2 + rail_y_off_1, 18, -30])
257 265
         rotate([-90, 0, 0])
258
-        rail(outer_length - slot - nema17_size - (2 * rail_mount_dist));
266
+        rail(outer_length - slot - nema17_size - (2 * rail_mount_dist), y_rail_dia);
259 267
     
260 268
     // y carriage on blue side
261
-    translate([rail_y_off_1 - (lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, y_carriage_pos, -slot])
262
-        y_carriage(idler_a_blue, idler_b_blue);
269
+    translate([rail_y_off_1 - (lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, y_carriage_pos, -slot])
270
+        y_carriage(x_rail_dia, y_rail_dia, idler_a_blue, idler_b_blue);
263 271
     
264 272
     // rail mounts for blue side
265 273
     color("green")
266 274
     translate([0, 2 * rail_mount_dist, -2 * slot])
267
-        rail_mount(slot);
275
+        rail_mount(slot, y_rail_dia);
268 276
     color("green")
269 277
     translate([0, outer_length - (2 * slot) - nema17_size - rail_mount_dist + 5, -2 * slot])
270
-        rail_mount(slot);
278
+        rail_mount(slot, y_rail_dia);
271 279
     
272 280
     // y smooth rail on red side
273 281
     color("cyan")
274
-    translate([outer_width - (2 * slot) - rail_dia / 2 - rail_y_off_1, 18, -30])
282
+    translate([outer_width - (2 * slot) - y_rail_dia / 2 - rail_y_off_1, 18, -30])
275 283
         rotate([-90, 0, 0])
276
-        rail(outer_length - slot - nema17_size - (2 * rail_mount_dist));
284
+        rail(outer_length - slot - nema17_size - (2 * rail_mount_dist), y_rail_dia);
277 285
     
278 286
     // y carriage on red side
279 287
     translate([outer_width - slot - y_carriage_width - y_carriage_block_width, y_carriage_pos + y_carriage_length, -slot])
280 288
         rotate([0, 0, 180])
281
-        y_carriage(idler_a_red, idler_b_red);
289
+        y_carriage(x_rail_dia, y_rail_dia, idler_a_red, idler_b_red);
282 290
     
283 291
     // rail mounts for red side
284 292
     color("green")
285 293
     translate([outer_width - (2 * slot), 2 * rail_mount_dist + rail_mount_len, -2 * slot])
286 294
         rotate([0, 0, 180])
287
-        rail_mount(slot);
295
+        rail_mount(slot, y_rail_dia);
288 296
     color("green")
289 297
     translate([outer_width - (2 * slot), outer_length - (2 * slot) - nema17_size - rail_mount_dist + 5 + rail_mount_len, -2 * slot])
290 298
         rotate([0, 0, 180])
291
-        rail_mount(slot);
299
+        rail_mount(slot, y_rail_dia);
292 300
 }
293 301
 
294 302
 module x_rails() {
@@ -297,16 +305,16 @@ module x_rails() {
297 305
     color("cyan")
298 306
     translate([30, y_carriage_pos, 15])
299 307
         rotate([0, 90, 0])
300
-        rail(outer_width - (4 * slot));
308
+        rail(outer_width - (4 * slot), x_rail_dia);
301 309
     
302 310
     color("cyan")
303 311
     translate([30, y_carriage_pos + x_rail_dist, 15])
304 312
         rotate([0, 90, 0])
305
-        rail(outer_width - (4 * slot));
313
+        rail(outer_width - (4 * slot), x_rail_dia);
306 314
     
307 315
     if (show_x_carriage) {
308 316
         translate([x_carriage_pos, y_carriage_pos - x_carriage_len_add, slot / 2])
309
-            x_carriage();
317
+            x_carriage(x_rail_dia);
310 318
     }
311 319
 }
312 320
 
@@ -481,31 +489,25 @@ module motion_z_rail() {
481 489
     color("green")
482 490
     translate([slot, 0, slot / 2 + 5 + (z_rail_mount_len - rail_mount_len) / 2])
483 491
         rotate([-90, 0, 90])
484
-        rail_mount(slot, z_rail_mount_len);
492
+        rail_mount(slot, z_rail_dia, z_rail_mount_len);
485 493
     
486 494
     // top clamp
487 495
     color("green")
488 496
     translate([slot, 0, outer_height - slot / 2 + 5 + (z_rail_mount_len - rail_mount_len) / 2 - slot])
489 497
         rotate([-90, 0, 90])
490
-        rail_mount(slot, z_rail_mount_len);
498
+        rail_mount(slot, z_rail_dia, z_rail_mount_len);
491 499
     
492 500
     // rail
493 501
     color("cyan")
494
-    translate([0, rail_y_off, 4])
495
-        rail(outer_height - slot - 8);
502
+    translate([0, rail_y_off_1 + z_rail_dia / 2, 4])
503
+        rail(outer_height - slot - 8, z_rail_dia);
496 504
 }
497 505
 
498
-z_carriage_wall = 10;
499
-z_carriage_bearing_dia_add = 0.4;
500
-z_carriage_cutout_width = 2;
501
-z_carriage_cabletie_cut_off = 5;
502
-z_carriage_use_cable_tie_mount = true;
503
-
504 506
 module z_carriage() {
505 507
     echo(bed_screw_len=slot + z_carriage_wall + bed_z_dist + 10);
506 508
     // bracket on t-slot bed frame
507 509
     color("green")
508
-    translate([frame_off_x + bed_x_off - z_rail_x_off, frame_off_y + bed_y_off - rail_y_off, 0]) {
510
+    translate([frame_off_x + bed_x_off - z_rail_x_off, frame_off_y + bed_y_off - rail_y_off_1 - z_rail_dia / 2, 0]) {
509 511
         // short side bracket on long rail
510 512
         difference() {
511 513
             translate([-z_carriage_wall, -z_carriage_wall, 0])
@@ -555,7 +557,7 @@ module z_carriage() {
555 557
         hull() {
556 558
             cylinder(d = lm8uu_outer + 10, h = slot + z_carriage_wall);
557 559
             
558
-            translate([frame_off_x + bed_x_off - z_rail_x_off - z_carriage_wall, frame_off_y + bed_y_off - rail_y_off - z_carriage_wall, 0])
560
+            translate([frame_off_x + bed_x_off - z_rail_x_off - z_carriage_wall, frame_off_y + bed_y_off - rail_y_off_1 - z_rail_dia / 2 - z_carriage_wall, 0])
559 561
                 cube([slot + (2 * z_carriage_wall) + 20, 1, slot + z_carriage_wall]);
560 562
         }
561 563
         
@@ -603,23 +605,23 @@ module motion_z() {
603 605
         motion_z_rail();
604 606
     
605 607
     // front left
606
-    translate([slot + z_rail_x_off, slot + rail_y_off, bed_draw_height - bed_z_dist - slot])
608
+    translate([slot + z_rail_x_off, slot + rail_y_off_1 + z_rail_dia / 2, bed_draw_height - bed_z_dist - slot])
607 609
         z_carriage();
608 610
     // front right
609
-    translate([outer_width - slot - z_rail_x_off, slot + rail_y_off, bed_draw_height - bed_z_dist - slot])
611
+    translate([outer_width - slot - z_rail_x_off, slot + rail_y_off_1 + z_rail_dia / 2, bed_draw_height - bed_z_dist - slot])
610 612
         scale([-1, 1, 1])
611 613
         z_carriage();
612 614
     // back left
613
-    translate([slot + z_rail_x_off, outer_length - slot - rail_y_off, bed_draw_height - bed_z_dist - slot])
615
+    translate([slot + z_rail_x_off, outer_length - slot - rail_y_off_1 - z_rail_dia / 2, bed_draw_height - bed_z_dist - slot])
614 616
         scale([1, -1, 1])
615 617
         z_carriage();
616 618
     // back right
617
-    translate([outer_width - slot - z_rail_x_off, outer_length - slot - rail_y_off, bed_draw_height - bed_z_dist - slot])
619
+    translate([outer_width - slot - z_rail_x_off, outer_length - slot - rail_y_off_1 - z_rail_dia / 2, bed_draw_height - bed_z_dist - slot])
618 620
         scale([-1, -1, 1])
619 621
         z_carriage();
620 622
     
621 623
     // yellow z-motor on top
622
-    translate([(outer_width - nema17_size) / 2, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall])
624
+    translate([(outer_width - nema17_size) / 2 - 80, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall])
623 625
     rotate([180, 0, 90]) {
624 626
         color("yellow")
625 627
         translate([0, 0, -65])
@@ -628,11 +630,157 @@ module motion_z() {
628 630
         color("green")
629 631
         nema17_mount(slot);
630 632
         
631
-        // blue motor pulley
633
+        // motor pulley
632 634
         color("orange")
633
-        translate([nema17_size / 2, nema17_size / 2, 8.2])
635
+        translate([nema17_size / 2, nema17_size / 2, 10])
634 636
             gt2_pulley();
635 637
     }
638
+    
639
+    // front left
640
+    translate([front_z_rail_off, slot, 0])
641
+        z_motion_rail_bearing_mount();
642
+    // front right
643
+    translate([outer_width - (rail_bearing_mount_width + (2 * rail_bearing_mount_screw)) - front_z_rail_off, slot, 0])
644
+        z_motion_rail_bearing_mount();
645
+    // back center
646
+    translate([(outer_width + (rail_bearing_mount_width + (2 * rail_bearing_mount_screw))) / 2, outer_length - slot, 0])
647
+        rotate([0, 0, 180])
648
+        z_motion_rail_bearing_mount(slot);
649
+    
650
+    // top pulley on back rail
651
+    color("orange")
652
+    translate([(outer_width + (rail_bearing_mount_width + (2 * rail_bearing_mount_screw))) / 2 - rail_bearing_mount_off_x, outer_length - slot - rail_bearing_mount_off_y, outer_height - 25])
653
+        gt2_pulley();
654
+    
655
+    // belts TODO
656
+    
657
+    // front left
658
+    translate([front_z_rail_off + rail_bearing_mount_off_x, slot + frame_off_y + bed_y_off, bed_draw_height - bed_z_dist - slot])
659
+        z_motion_carriage();
660
+    // front right
661
+    translate([outer_width - (rail_bearing_mount_width + (2 * rail_bearing_mount_screw)) - front_z_rail_off + rail_bearing_mount_off_x, slot + frame_off_y + bed_y_off, bed_draw_height - bed_z_dist - slot])
662
+        z_motion_carriage();
663
+    // back center
664
+    translate([(outer_width + (rail_bearing_mount_width + (2 * rail_bearing_mount_screw))) / 2 - rail_bearing_mount_off_x, outer_length - slot - frame_off_y - bed_y_off, bed_draw_height - bed_z_dist - slot])
665
+        rotate([0, 0, 180])
666
+        z_motion_carriage();
667
+}
668
+
669
+front_z_rail_off = 160;
670
+
671
+// 608 bearing
672
+rail_bearing_dia = 22;
673
+rail_bearing_height = 7 * 2;
674
+
675
+rail_bearing_mount_screw = 10;
676
+rail_bearing_mount_height = 20;
677
+rail_bearing_mount_dia = rail_bearing_dia + 0.2;
678
+rail_bearing_mount_dia_add = 5;
679
+rail_bearing_mount_base = 5;
680
+rail_bearing_mount_lip_height = 1;
681
+rail_bearing_mount_lip_remove = 4;
682
+rail_bearing_mount_width_add = 10;
683
+
684
+rail_bearing_mount_width = rail_bearing_mount_dia + (2 * rail_bearing_mount_width_add);
685
+
686
+rail_bearing_mount_off_x = rail_bearing_mount_screw + (rail_bearing_mount_width / 2);
687
+rail_bearing_mount_off_y = rail_bearing_mount_base + (rail_bearing_mount_dia / 2);
688
+
689
+z_motion_carriage_width = 45;
690
+z_motion_carriage_length = 10;
691
+z_motion_carriage_hole_off = 7;
692
+z_motion_carriage_block_width = 18;
693
+
694
+z_motion_carriage_block_length = frame_off_y + bed_y_off - rail_bearing_mount_off_y;
695
+
696
+module z_motion_carriage() {
697
+    color("green")
698
+    translate([-z_motion_carriage_width / 2, -z_motion_carriage_length, 0])
699
+    difference() {
700
+        cube([z_motion_carriage_width, z_motion_carriage_length, slot]);
701
+        
702
+        translate([z_motion_carriage_hole_off, -1, slot / 2])
703
+            rotate([-90, 0, 0])
704
+            cylinder(d = 4.2, h = z_motion_carriage_length + 2);
705
+        translate([z_motion_carriage_width - z_motion_carriage_hole_off, -1, slot / 2])
706
+            rotate([-90, 0, 0])
707
+            cylinder(d = 4.2, h = z_motion_carriage_length + 2);
708
+    }
709
+    
710
+    color("red") // TODO!
711
+    translate([-z_motion_carriage_block_width / 2, -z_motion_carriage_length - z_motion_carriage_block_length, 0])
712
+    difference() {
713
+        cube([z_motion_carriage_block_width, z_motion_carriage_block_length, slot]);
714
+        
715
+        // TODO proper m8 / t8 "nut"
716
+    }
717
+}
718
+
719
+z_motion_rail_off = -5;
720
+
721
+module z_motion_rail_bearing_mount(off = 0) {
722
+    // z motion rail
723
+    color("magenta")
724
+    translate([rail_bearing_mount_off_x, rail_bearing_mount_off_y, -z_motion_rail_off / 2])
725
+        rail(outer_height + z_motion_rail_off, z_rail_dia);
726
+    
727
+    // bottom z bearing
728
+    translate([0, 0, (slot - rail_bearing_mount_height) / 2])
729
+        rail_bearing_mount();
730
+    
731
+    // top z bearing
732
+    translate([0, 0, outer_height - ((slot / 2) + rail_bearing_mount_height / 2 + off)])
733
+        rail_bearing_mount();
734
+}
735
+
736
+module rail_bearing_mount() {
737
+    $fn = 20;
738
+    
739
+    color("green")
740
+    for(i = [0 : 1])
741
+    translate([-rail_bearing_mount_screw + i * (rail_bearing_mount_width + rail_bearing_mount_screw) + rail_bearing_mount_screw, 0, 0])
742
+    difference() {
743
+        cube([rail_bearing_mount_screw, rail_bearing_mount_base, rail_bearing_mount_height]);
744
+        translate([rail_bearing_mount_screw / 2, -1, rail_bearing_mount_height / 2])
745
+            rotate([-90, 0, 0])
746
+            cylinder(d = 4.2, h = rail_bearing_mount_base + 2);
747
+    }
748
+    
749
+    color("green")
750
+    translate([rail_bearing_mount_screw, 0, (rail_bearing_mount_height - rail_bearing_height) / 2])
751
+    difference() {
752
+        hull() {
753
+            cube([rail_bearing_mount_width, rail_bearing_mount_base, rail_bearing_height]);
754
+
755
+            translate([rail_bearing_mount_width / 2, rail_bearing_mount_base + ((rail_bearing_mount_dia + rail_bearing_mount_dia_add) / 2), 0])
756
+                cylinder(d = rail_bearing_mount_dia, h = rail_bearing_height);
757
+        }
758
+        
759
+        translate([rail_bearing_mount_width / 2, rail_bearing_mount_base + rail_bearing_mount_dia / 2, -1])
760
+            cylinder(d = rail_bearing_mount_dia, h = rail_bearing_height + 2);
761
+    }
762
+    
763
+    // bottom lip
764
+    color("blue")
765
+    translate([rail_bearing_mount_screw, 0, (rail_bearing_mount_height - rail_bearing_height) / 2 - rail_bearing_mount_lip_height])
766
+    difference() {
767
+        hull() {
768
+            cube([rail_bearing_mount_width, rail_bearing_mount_base, rail_bearing_mount_lip_height]);
769
+
770
+            translate([rail_bearing_mount_width / 2, rail_bearing_mount_base + ((rail_bearing_mount_dia + rail_bearing_mount_dia_add) / 2), 0])
771
+                cylinder(d = rail_bearing_mount_dia, h = rail_bearing_mount_lip_height);
772
+        }
773
+        
774
+        translate([rail_bearing_mount_width / 2, rail_bearing_mount_base + rail_bearing_mount_dia / 2, -1])
775
+            cylinder(d = rail_bearing_mount_dia - rail_bearing_mount_lip_remove, h = rail_bearing_height + 2);
776
+    }
777
+    
778
+    %translate([rail_bearing_mount_width / 2 + rail_bearing_mount_screw, rail_bearing_mount_base + rail_bearing_mount_dia / 2, (rail_bearing_mount_height - rail_bearing_height) / 2])
779
+    difference() {
780
+        cylinder(d = rail_bearing_dia, h = rail_bearing_height);
781
+        translate([0, 0, -1])
782
+            cylinder(d = z_rail_dia, h = rail_bearing_height + 2);
783
+    }
636 784
 }
637 785
 
638 786
 // #######################################################

Loading…
Cancel
Save