Browse Source

Continued work on Z-Axis.

Thomas Buck 6 years ago
parent
commit
53ce47fd8a
4 changed files with 150 additions and 58 deletions
  1. 13
    7
      lib/extruder.scad
  2. 30
    5
      lib/nema.scad
  3. 11
    5
      lib/rail_mount.scad
  4. 96
    41
      xyRepRap.scad

+ 13
- 7
lib/extruder.scad View File

49
 // #######################################################
49
 // #######################################################
50
 
50
 
51
 if (draw_extruder)
51
 if (draw_extruder)
52
-    extruder(30, true);
52
+    extruder(30, "1", true);
53
 
53
 
54
-module extruder(slot, draw_slot = false) {
54
+module extruder(slot, id = "", draw_slot = false) {
55
     translate([-nema17_size / 2 - bracket_dist_add, 0, slot + bracket_height + 10])
55
     translate([-nema17_size / 2 - bracket_dist_add, 0, slot + bracket_height + 10])
56
     rotate([-90, 0, 0])
56
     rotate([-90, 0, 0])
57
-        extruder_assembly();
57
+        extruder_assembly(id);
58
     
58
     
59
     color("green")
59
     color("green")
60
     extruder_bracket(slot);
60
     extruder_bracket(slot);
89
     }
89
     }
90
 }
90
 }
91
 
91
 
92
-module extruder_assembly() {
92
+module extruder_assembly(id = "") {
93
     color("cyan") extruder_holder();
93
     color("cyan") extruder_holder();
94
     color("yellow") extruder_top_plate();
94
     color("yellow") extruder_top_plate();
95
-    color("orange") extruder_cover(); 
95
+    color("orange") extruder_cover(id); 
96
     
96
     
97
     if (!extruder_lever_with_switch) {
97
     if (!extruder_lever_with_switch) {
98
         color("red")
98
         color("red")
378
     }
378
     }
379
 }
379
 }
380
 
380
 
381
-module extruder_cover() {
381
+module extruder_cover(id = "") {
382
     difference() {
382
     difference() {
383
         union() {
383
         union() {
384
             translate([-extruder_width/2, -extruder_cover_d, 0])
384
             translate([-extruder_width/2, -extruder_cover_d, 0])
385
                 rounded_cube(extruder_width, extruder_cover_d, extruder_height_m, fillet,fillet,fillet);        
385
                 rounded_cube(extruder_width, extruder_cover_d, extruder_height_m, fillet,fillet,fillet);        
386
             translate([extruder_filament_offset-5,-6, extruder_height_m-1])
386
             translate([extruder_filament_offset-5,-6, extruder_height_m-1])
387
-                cube ([10, 6, 20]);    
387
+                cube ([10, 6, 20]);
388
+           
389
+            // add id number
390
+            translate([-6, -extruder_cover_d + 1, 12])
391
+                rotate([90, 90, 0])
392
+                linear_extrude(height = 3)
393
+                text(id, 12, font = "Liberation Sans:style=Bold");
388
         }
394
         }
389
         
395
         
390
         translate([extruder_filament_offset,0,0])
396
         translate([extruder_filament_offset,0,0])

+ 30
- 5
lib/nema.scad View File

15
 
15
 
16
 nema17_mount_wall = 8.0;
16
 nema17_mount_wall = 8.0;
17
 nema17_mount_hole_size = 3.4;
17
 nema17_mount_hole_size = 3.4;
18
+nema17_mount_hole_off_add = 3.5;
19
+
20
+nema17_mount_double_high = false;
21
+nema17_mount_back_support = true;
22
+
23
+draw_nema17_mount = false;
24
+
25
+// #######################################################
26
+
27
+if (draw_nema17_mount) nema17_mount(30);
18
 
28
 
19
 module nema17_holes_face(height, length, hole) {
29
 module nema17_holes_face(height, length, hole) {
20
     translate([nema17_size / 2, nema17_size / 2, height - 4.5]) {
30
     translate([nema17_size / 2, nema17_size / 2, height - 4.5]) {
55
     // mount on side
65
     // mount on side
56
     translate([nema17_size, 0, 0])
66
     translate([nema17_size, 0, 0])
57
     difference() {
67
     difference() {
58
-        cube([nema17_mount_wall, nema17_size, nema17_mount_wall + (2 * slot)]);
59
-        
60
-        hole_off_add = 3.5;
68
+        if (nema17_mount_double_high) {
69
+            cube([nema17_mount_wall, nema17_size, nema17_mount_wall + (2 * slot)]);
70
+        } else {
71
+            cube([nema17_mount_wall, nema17_size, nema17_mount_wall + slot]);
72
+        }
61
         
73
         
62
         for (i = [0, 1]) {
74
         for (i = [0, 1]) {
63
-            translate([nema17_mount_wall + 1, nema17_size / 3 - hole_off_add, nema17_mount_wall + (slot / 2) + (i * slot)]) {
75
+            translate([nema17_mount_wall + 1, nema17_size / 3 - nema17_mount_hole_off_add, nema17_mount_wall + (slot / 2) + (i * slot)]) {
64
                     rotate([0, -90, 0])
76
                     rotate([0, -90, 0])
65
                         cylinder(d = 4.4, h = nema17_mount_wall + 2);
77
                         cylinder(d = 4.4, h = nema17_mount_wall + 2);
66
             
78
             
67
-                    translate([0, nema17_size / 3 + (2 * hole_off_add), 0])
79
+                    translate([0, nema17_size / 3 + (2 * nema17_mount_hole_off_add), 0])
68
                         rotate([0, -90, 0])
80
                         rotate([0, -90, 0])
69
                         cylinder(d = 4.4, h = nema17_mount_wall + 2);
81
                         cylinder(d = 4.4, h = nema17_mount_wall + 2);
70
             }
82
             }
71
         }
83
         }
72
     }
84
     }
85
+    
86
+    if (nema17_mount_back_support) {
87
+        translate([nema17_size + nema17_mount_wall, 0, 0])
88
+        difference() {
89
+            cube([slot, nema17_size, nema17_mount_wall]);
90
+            
91
+            translate([slot / 2, nema17_size / 3 - nema17_mount_hole_off_add, -1])
92
+                cylinder(d = 4.4, h = nema17_mount_wall + 2);
93
+            
94
+            translate([slot / 2, nema17_size * 2 / 3 + nema17_mount_hole_off_add, -1])
95
+                cylinder(d = 4.4, h = nema17_mount_wall + 2);
96
+        }
97
+    }
73
 }
98
 }

+ 11
- 5
lib/rail_mount.scad View File

12
 
12
 
13
 rail_mount_height = rail_y_off_1 + 6;
13
 rail_mount_height = rail_y_off_1 + 6;
14
 
14
 
15
-module rail_mount(slot) {
15
+draw_rail_mount = false;
16
+    
17
+// #######################################################
18
+
19
+if (draw_rail_mount) rail_mount(30, 20);
20
+
21
+module rail_mount(slot, rail_mount_len = rail_mount_len) {
16
     $fn = 20;
22
     $fn = 20;
17
     
23
     
24
+    echo(rail_mount_len=rail_mount_len);
25
+    
18
     difference() {
26
     difference() {
19
         union() {
27
         union() {
20
             // main body
28
             // main body
62
         }
70
         }
63
         
71
         
64
         translate([-10, -10, -22])
72
         translate([-10, -10, -22])
65
-            cube([30, 30, 30]);
73
+            cube([30, rail_mount_len + 20, 30]);
66
         
74
         
67
         translate([-10, -10, 2 * slot - 8])
75
         translate([-10, -10, 2 * slot - 8])
68
-            cube([30, 30, 30]);
76
+            cube([30, rail_mount_len + 20, 30]);
69
     }
77
     }
70
 }
78
 }
71
-
72
-//rail_mount(30);

+ 96
- 41
xyRepRap.scad View File

32
 bed_z_dist = 30;
32
 bed_z_dist = 30;
33
 
33
 
34
 // display heatbed centered in print volume
34
 // display heatbed centered in print volume
35
-bed_draw_height = (outer_height - heatbed_height) / 2;
35
+bed_draw_height = (outer_height - heatbed_height) / 2; // + 175;
36
+
37
+show_outer_frame = true;
38
+show_extruders = false;
39
+show_z_motion = true;
40
+
41
+show_heatbed_frame = true;
42
+show_heatbed = false;
43
+
44
+show_xy_motion = true;
45
+show_x_carriage = false;
46
+show_belts = false;
36
 
47
 
37
 echo(print_x=heatbed_width, print_y=heatbed_length);
48
 echo(print_x=heatbed_width, print_y=heatbed_length);
38
 echo(frame_x=outer_width, frame_y=outer_length, frame_z=outer_height);
49
 echo(frame_x=outer_width, frame_y=outer_length, frame_z=outer_height);
51
 include <lib/extruder.scad>
62
 include <lib/extruder.scad>
52
 
63
 
53
 module gt2_belt(length) {
64
 module gt2_belt(length) {
54
-    //difference() {
55
-    //    belting("straight", "GT2_2mm", belt_length = length);
56
-    //    translate([-5, -5, 6])
57
-    //        cube([length + 10, 10, 10]);
58
-    //}
65
+    if (show_belts) {
66
+        difference() {
67
+            belting("straight", "GT2_2mm", belt_length = length);
68
+            translate([-5, -5, 6])
69
+                cube([length + 10, 10, 10]);
70
+        }
71
+    }
59
 }
72
 }
60
 
73
 
61
 // #######################################################
74
 // #######################################################
291
         rotate([0, 90, 0])
304
         rotate([0, 90, 0])
292
         rail(outer_width - (4 * slot));
305
         rail(outer_width - (4 * slot));
293
     
306
     
294
-    //translate([x_carriage_pos, y_carriage_pos - x_carriage_len_add, slot / 2])
295
-    //    x_carriage();
307
+    if (show_x_carriage) {
308
+        translate([x_carriage_pos, y_carriage_pos - x_carriage_len_add, slot / 2])
309
+            x_carriage();
310
+    }
296
 }
311
 }
297
 
312
 
298
 module motion_xy() {
313
 module motion_xy() {
429
 
444
 
430
 module heatbed() {
445
 module heatbed() {
431
     translate([slot + frame_off_x, slot + frame_off_y, bed_draw_height]) {
446
     translate([slot + frame_off_x, slot + frame_off_y, bed_draw_height]) {
432
-        //%heatbed_plate();
447
+        if (show_heatbed) {
448
+            %heatbed_plate();
449
+        }
433
         
450
         
434
         // t-slots as heatbed frame
451
         // t-slots as heatbed frame
435
         translate([bed_x_off, bed_y_off, -slot - bed_z_dist])
452
         translate([bed_x_off, bed_y_off, -slot - bed_z_dist])
456
     }
473
     }
457
 }
474
 }
458
 
475
 
459
-module motion_z() {
460
-    // front left bottom
461
-    color("green")
462
-    translate([(2 * slot) + 60, slot, slot / 2 + 5])
463
-        rotate([-90, 0, 90])
464
-        rail_mount(slot);
465
-    // front left top
476
+z_rail_x_off = 60;
477
+z_rail_mount_len = 20;
478
+
479
+module motion_z_rail() {
480
+    // bottom clamp
466
     color("green")
481
     color("green")
467
-    translate([(2 * slot) + 60, slot, outer_height - slot / 2 + 5 - slot])
482
+    translate([slot, 0, slot / 2 + 5 + (z_rail_mount_len - rail_mount_len) / 2])
468
         rotate([-90, 0, 90])
483
         rotate([-90, 0, 90])
469
-        rail_mount(slot);
470
-    // front left rail
471
-    color("cyan")
472
-    translate([slot + 60, slot + 15, 6])
473
-        rail(outer_height - slot - 12);
484
+        rail_mount(slot, z_rail_mount_len);
474
     
485
     
475
-    // front right bottom
476
-    color("green")
477
-    translate([outer_width - (2 * slot), slot, slot / 2 + 5])
478
-        rotate([-90, 0, 90])
479
-        rail_mount(slot);
480
-    // front right top
486
+    // top clamp
481
     color("green")
487
     color("green")
482
-    translate([outer_width - (2 * slot), slot, outer_height - slot / 2 + 5 - slot])
488
+    translate([slot, 0, outer_height - slot / 2 + 5 + (z_rail_mount_len - rail_mount_len) / 2 - slot])
483
         rotate([-90, 0, 90])
489
         rotate([-90, 0, 90])
484
-        rail_mount(slot);
485
-    // front right rail
490
+        rail_mount(slot, z_rail_mount_len);
491
+    
492
+    // rail
486
     color("cyan")
493
     color("cyan")
487
-    translate([outer_width - slot - 60, slot + 15, 6])
488
-        rail(outer_height - slot - 12);
494
+    translate([0, 15, 4])
495
+        rail(outer_height - slot - 8);
496
+}
497
+
498
+module motion_z() {
499
+    // front left
500
+    translate([slot + z_rail_x_off, slot, 0])
501
+        motion_z_rail();
502
+    // front right
503
+    translate([outer_width - z_rail_x_off - slot, slot, 0])
504
+        motion_z_rail();
505
+    // back left
506
+    translate([slot + z_rail_x_off, outer_length - slot, 0])
507
+        rotate([0, 0, 180])
508
+        motion_z_rail();
509
+    // back right
510
+    translate([outer_width - z_rail_x_off - slot, outer_length - slot, 0])
511
+        rotate([0, 0, 180])
512
+        motion_z_rail();
513
+    
514
+    translate([(outer_width - nema17_size) / 2, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall])
515
+    rotate([180, 0, 90]) {
516
+        color("yellow")
517
+        translate([0, 0, -65])
518
+            nema17(65);
519
+        
520
+        color("green")
521
+        nema17_mount(slot);
522
+        
523
+        // blue motor pulley
524
+        color("orange")
525
+        translate([nema17_size / 2, nema17_size / 2, 8.2])
526
+            gt2_pulley();
527
+    }
489
 }
528
 }
490
 
529
 
491
 // #######################################################
530
 // #######################################################
497
     translate([0, -bracket_height, outer_height - slot])
536
     translate([0, -bracket_height, outer_height - slot])
498
     rotate([0, 0, 90]) {
537
     rotate([0, 0, 90]) {
499
         translate([0, -(outer_width + w) / 4, 0])
538
         translate([0, -(outer_width + w) / 4, 0])
500
-            extruder(slot);
539
+            extruder(slot, "1");
501
         translate([0, -(outer_width + w) / 2, 0])
540
         translate([0, -(outer_width + w) / 2, 0])
502
-            extruder(slot);
541
+            extruder(slot, "2");
503
         translate([0, -(outer_width + w) * 3 / 4, 0])
542
         translate([0, -(outer_width + w) * 3 / 4, 0])
504
-            extruder(slot);
543
+            extruder(slot, "3");
505
     }
544
     }
506
 }
545
 }
507
 
546
 
509
 // ####################### Assembly #######################
548
 // ####################### Assembly #######################
510
 // ########################################################
549
 // ########################################################
511
 
550
 
512
-frame();
551
+module assembly() {
552
+    if (show_outer_frame) {
553
+        frame();
554
+    }
513
 
555
 
514
-motion_xy();
515
-//extruders();
556
+    if (show_xy_motion) {
557
+        motion_xy();
558
+    }
559
+    
560
+    if (show_extruders) {
561
+        extruders();
562
+    }
563
+
564
+    if (show_z_motion) {
565
+        motion_z();
566
+    }
567
+    
568
+    if (show_heatbed_frame) {
569
+        heatbed();
570
+    }
571
+}
516
 
572
 
517
-motion_z();
518
-heatbed();
573
+assembly();

Loading…
Cancel
Save