-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy pathfull_assembly.scad
1981 lines (1758 loc) · 56.7 KB
/
full_assembly.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
$do_prerender=true;
include <config.scad>
include <GDMUtils.scad>
use <NEMA.scad>
use <wiring.scad>
use <acme_screw.scad>
use <vitamins.scad>
use <adjustment_screw_parts.scad>
use <bridge_brace_parts.scad>
use <bridge_brace_center_parts.scad>
use <bridge_segment_parts.scad>
use <cable_chain_link_parts.scad>
use <cable_chain_mount_parts.scad>
use <compression_screw_parts.scad>
use <cooling_fan_shroud_parts.scad>
use <drive_gear_parts.scad>
use <extruder_fan_clip_parts.scad>
use <extruder_fan_shroud_parts.scad>
use <extruder_idler_parts.scad>
use <extruder_motor_clip_parts.scad>
use <jhead_platform_parts.scad>
use <lifter_coupler_parts.scad>
use <lifter_rod_parts.scad>
use <glass_bed_support_parts.scad>
use <rail_segment_parts.scad>
use <rail_xy_motor_segment_parts.scad>
use <rail_y_endcap_parts.scad>
use <rail_z_endcap_parts.scad>
use <ramps_mount_parts.scad>
use <sled_endcap_parts.scad>
use <spool_holder_parts.scad>
use <support_leg_parts.scad>
use <wire_clip_parts.scad>
use <xy_joiner_parts.scad>
use <xy_sled_parts.scad>
use <yz_joiner_parts.scad>
use <z_base_parts.scad>
use <z_rail_parts.scad>
use <z_sled_parts.scad>
hide_endcaps = false;
module xy_motor_assembly_1(explode=0, arrows=false)
{
// view: [0, 0, 0] [225, 0, 330] 140
// desc: Print a drive gear with high (around 50%) infill density. Insert a 3mm nut into the slot on the bottom of the drive gear. Push it down the slot until the holes line up with the hole in the nut.
drive_gear();
down(explode/2-(gear_base-1)/2) {
right(motor_shaft_size/2+1.5) {
yrot(90) {
color("silver") metric_nut(size=set_screw_size, hole=true);
}
}
}
// Construction arrow.
if(arrows && explode>10) {
down(explode/4) {
right(motor_shaft_size/2+1.5) {
yrot(90) arrow(size=explode/6);
}
}
}
}
//!xy_motor_assembly_1(explode=100, arrows=true);
//!xy_motor_assembly_1();
module xy_motor_assembly_2(explode=0, arrows=false)
{
// view: [0, 0, 0] [235, 0, 305] 140
// desc: Thread a 3mm diam (12mm long) bolt just through the inserted nut.
xy_motor_assembly_1();
up((gear_base-1)/2) {
right(explode/2+motor_shaft_size/2+11.5) {
yrot(90) {
color("silver") screw(screwsize=set_screw_size, screwlen=12, headsize=set_screw_size*2, headlen=set_screw_size);
}
}
}
// Construction arrow.
if(arrows && explode>10) {
up((gear_base-1)/2) {
right(explode/5+motor_shaft_size/2+11.5) {
arrow(size=explode/6);
}
}
}
}
//!xy_motor_assembly_2(explode=100, arrows=true);
//!xy_motor_assembly_2();
module xy_motor_assembly_3(explode=0, arrows=false)
{
// view: [30, 25, 30] [55, 0, 25] 475
// desc: Slide a drive gear onto the shaft of a stepper motor, making sure to align the flat of the shaft with the flat of the shaft hole. Tighten the set screw onto the shaft flat. Repeat this with the other drive gear and another stepper. Lubricate the drive gear teeth with mineral oil.
nema17_stepper(h=motor_length, shaft_len=motor_shaft_length, $fa=1, $fs=0.5);
up(1+2.1+explode) {
xy_motor_assembly_2();
}
// Construction arrow.
if(arrows && explode>10) {
up(explode*0.6) {
yrot(-90) arrow(size=explode/3);
}
}
}
//!xy_motor_assembly_3(explode=100, arrows=true);
//!xy_motor_assembly_3();
module y_motor_segment_assembly_1(explode=0, arrows=false)
{
// view: [0, 0, 87] [62, 0, 191] 900
// desc: Seat the stepper motor with drive gear in the X/Y motor rail segment, with the wiring facing towards the left. Route the wiring out the front left wiring access hole.
motor_width = nema_motor_width(17)+printer_slop*2;
rail_xy_motor_segment();
// Stepper Motor
up(motor_top_z) {
up(explode*1.1) {
zrot(-90) xy_motor_assembly_3();
down(motor_length-3) {
wiring([
[0, 0, 0],
[-rail_width/2+joiner_width+5, 0, 0],
[-rail_width/2+joiner_width+5, -motor_rail_length/3.5-2, 5],
[-rail_width/1.5, -motor_rail_length/3.5-2, 5],
[-rail_width/1.5-10, -motor_rail_length/2-25, 0],
[-rail_width/1.5-30, -motor_rail_length/2-25, 0],
], 4, wirenum=2);
}
}
}
// Construction arrows.
if(arrows && explode>10) {
up(rail_height+groove_height+explode/8) {
yrot(-90) arrow(size=explode/3);
}
}
}
//!y_motor_segment_assembly_1(explode=100, arrows=true);
//!y_motor_segment_assembly_1();
module y_motor_segment_assembly_2(explode=0, arrows=false)
{
// view: [-20, -110, 30] [43, 0, 22] 1100
// desc: Insert the limit microswitch in the left-side limit switch clip in the X/Y motor rail segment. Orient the switch with the arm leaning outwards on top. Route the wiring through the back of the limit switch clip, and out the same front-left wiring access hole as the motor wires.
motor_width = nema_motor_width(17)+printer_slop*2;
y_motor_segment_assembly_1();
// Limit switch
sw_x = motor_width/2+7+endstop_thick/2;
sw_y = drive_gear_diam/2+1-endstop_depth/2;
sw_z = motor_top_z+endstop_length/2-5;
fwd(explode*2+sw_y) {
up(sw_z) left(sw_x) xrot(90) microswitch();
wiring([
[-sw_x, 10, sw_z+8],
[-sw_x, 19, sw_z+8],
[-sw_x-2, 19, sw_z-8],
[-rail_width/2+joiner_width+3, 20, 4],
[-rail_width/2+joiner_width+3, -motor_rail_length/3.5+9, 9],
[-rail_width/1.5, -motor_rail_length/3.5+9, 9],
[-rail_width/1.5-8, -motor_rail_length/2-14, 4.5],
[-rail_width/1.5-30, -motor_rail_length/2-14, 4.5],
], 1);
wiring([
[-sw_x, 10, sw_z-8],
[-sw_x, 19, sw_z-8],
[-rail_width/2+joiner_width+5, 20, 4],
[-rail_width/2+joiner_width+5, -motor_rail_length/3.5+7, 9],
[-rail_width/1.5+2, -motor_rail_length/3.5+7, 9],
[-rail_width/1.5-7, -motor_rail_length/2-16, 4.5],
[-rail_width/1.5-30, -motor_rail_length/2-16, 4.5],
], 1, wirenum=1);
}
// Construction arrows.
if(arrows && explode>10) {
up(sw_z) {
left(sw_x) {
fwd(explode*1.3) {
zrot(-90) arrow(size=explode/3);
}
}
}
}
}
//!y_motor_segment_assembly_2(explode=100, arrows=true);
//!y_motor_segment_assembly_2();
module y_axis_assembly_1(slidepos=0, explode=0, arrows=false)
{
// view: [0, 0, 0] [45, 0, 310] 1800
// desc: Join a rail segment to each end of another motor rail assembly. Apply mineral oil to the slider rail V-grooves for lubrication.
platform_vert_off = rail_height+groove_height/2;
y_motor_segment_assembly_2();
zrot(90) {
zring(r=(motor_rail_length+rail_length+2*explode)/2, n=2) {
zrot(90) rail_segment();
}
}
// Construction arrows.
if(arrows && explode>10) {
up(rail_height/2+groove_height/2) {
zrot(90) zring(r=(motor_rail_length+explode)/2) {
arrow(size=explode/3);
}
}
}
// Sled
up(platform_vert_off) {
fwd(slidepos) {
children();
}
}
}
//!y_axis_assembly_1(explode=100, arrows=true);
//!y_axis_assembly_1(slidepos=90);
module y_axis_assembly_2(explode=0, arrows=false)
{
// view: [0, 75, 25] [55, 0, 140] 1800
// desc: Join opposing glass bed supports to either side of both Y sled endcaps. Screw an adjustment screws into each of the supports, leaving them loose for now.
sled_endcap();
fwd(20-joiner_width/2) {
right(platform_width/2+explode*1.5) {
zrot(90) glass_bed_support2();
right(glass_width/2-platform_width/2-adjust_screw_diam/2-1) {
up(explode*1.0+10+7) xrot(180) adjustment_screw();
}
}
left(platform_width/2+explode*1.5) {
zrot(-90) glass_bed_support1();
left(glass_width/2-platform_width/2-adjust_screw_diam/2-1) {
up(explode*1.0+10+7) xrot(180) adjustment_screw();
}
}
}
// Construction arrows.
if(arrows && explode>20) {
fwd(20-joiner_width/2) {
zring(r=(platform_width+explode*1.5)/2) {
arrow(size=explode/3);
}
up(explode/2) {
xspread(glass_width-adjust_screw_diam-2*1+explode*3) {
yrot(-90) arrow(size=explode/3);
}
}
}
}
}
//!y_axis_assembly_2(explode=100, arrows=true);
//!y_axis_assembly_2(explode=0);
module y_axis_assembly_3(explode=0, arrows=false)
{
// view: [-40, 10, 40] [55, 0, 230] 1400
// desc: Join two XY sled parts together. Make sure the bottom racks line up. Lubricate the slider pinchers and gear rack teeth on the underside of the sled with mineral oil.
up(groove_height/2+rail_offset) {
yspread(platform_length+0.5+explode) {
yrot(180) xy_sled();
}
children();
}
// Construction arrows.
if(arrows && explode>20) {
zrot(-90) arrow(size=explode/3);
}
}
//!y_axis_assembly_3(explode=100, arrows=true);
//!y_axis_assembly_3();
module y_axis_assembly_4(explode=0, arrows=false)
{
// view: [0, -60, 0] [40, 0, 230] 1500
// desc: Join a Y sled endcap assembly to one end of the Y sled central assembly.
up(groove_height/2+rail_offset) {
fwd(platform_length+0.5+explode) {
y_axis_assembly_2();
}
}
y_axis_assembly_3() children();
// Construction arrows.
if(arrows && explode>20) {
fwd(platform_length+explode*0.5) {
zrot(-90) arrow(size=explode/3);
}
}
}
//!y_axis_assembly_4(explode=100, arrows=true);
//!y_axis_assembly_4();
module y_axis_assembly_5(slidepos=0, explode=0, arrows=false)
{
// view: [0, 0, 0] [55, 0, 310] 2200
// desc: Slide the Y sled partial assembly onto the Y axis rails assembly, so that it is centered. The gear rack should slide between the limit switch on the left, and the drive gear. Adjust the drive gear if necessary, so that it aligns exactly with the herringbone rack.
y_axis_assembly_1(slidepos=slidepos) {
back(explode*4) {
if ($children>1) children(0);
zrot(180) y_axis_assembly_4() {
if ($children>1) children(1);
}
// Construction arrows.
if(arrows && explode>75) {
fwd(platform_length+explode/2) {
zrot(90) arrow(size=explode/3);
}
}
}
}
}
//!y_axis_assembly_5(slidepos=0, explode=100, arrows=true);
//!y_axis_assembly_5();
module y_axis_assembly_6(slidepos=0, explode=0, arrows=false)
{
// view: [0, 0, 0] [55, 0, 310] 2200
// desc: Join the other Y sled endcap assembly to the end of the Y sled partial assembly.
y_axis_assembly_5(slidepos=slidepos) {
fwd(platform_length+0.5+explode*3) {
up(groove_height/2+rail_offset) {
y_axis_assembly_2();
}
// Construction arrows.
if(arrows && explode>75) {
back(explode) {
zrot(-90) arrow(size=explode/3);
}
}
}
up(0) children();
}
}
//!y_axis_assembly_6(slidepos=0, explode=100, arrows=true);
//!y_axis_assembly_6();
module y_axis_assembly_7(slidepos=0, explode=0, arrows=false)
{
// view: [0, 0, 0] [55, 0, 310] 2200
// desc: Optionally join a rail endcap to each end of the Y axis.
platform_vert_off = rail_height+groove_height/2;
zrot(90) zring(r=(motor_rail_length+2*rail_length+3*explode)/2) {
if (hide_endcaps == false) {
zrot(90) rail_y_endcap();
}
}
y_axis_assembly_6(slidepos=slidepos) {
children();
}
// Construction arrows.
if(arrows && explode>10) {
up(rail_height/2+groove_height/2) {
zrot(90) zring(r=(motor_rail_length+2*rail_length+1.5*explode)/2) {
arrow(size=explode/3);
}
}
}
}
//!y_axis_assembly_7(explode=100, arrows=true);
//!y_axis_assembly_7();
module x_motor_segment_assembly_1(explode=0, arrows=false)
{
// view: [0, 0, 87] [62, 0, 11] 900
// desc: Seat the stepper motor with drive gear in the X/Y motor rail segment, with the wiring facing towards the left. Route the wiring out the front left wiring access hole.
motor_width = nema_motor_width(17)+printer_slop*2;
rail_xy_motor_segment();
// Stepper Motor
up(motor_top_z) {
up(explode*1.1) {
zrot(-90) xy_motor_assembly_3();
down(motor_length-3) {
wiring([
[0, 0, 0],
[-rail_width/2+joiner_width+20, 0, 0],
[-rail_width/2+joiner_width+20, -motor_rail_length/3.5-4, 5],
[0, -motor_rail_length/3.5-4, 5],
[0, -motor_rail_length/2-20, 5],
], 4, wirenum=2);
}
}
}
// Construction arrows.
if(arrows && explode>10) {
up(rail_height+groove_height+explode/8) {
yrot(-90) arrow(size=explode/3);
}
}
}
//!x_motor_segment_assembly_1(explode=100, arrows=true);
//!x_motor_segment_assembly_1();
module x_motor_segment_assembly_2(explode=0, arrows=false)
{
// view: [-20, -110, 30] [43, 0, 22] 1100
// desc: Insert the limit microswitch in the left-side limit switch clip in the X/Y motor rail segment. Route the wiring through the back of the limit switch clip, and out the same front-left wiring access hole as the motor wires.
motor_width = nema_motor_width(17)+printer_slop*2;
x_motor_segment_assembly_1();
// Limit switch
sw_x = motor_width/2+7+endstop_thick/2;
sw_y = drive_gear_diam/2+1-endstop_depth/2;
sw_z = motor_top_z+endstop_length/2-5;
fwd(explode*2+sw_y) {
up(sw_z) left(sw_x) xrot(90) microswitch();
wiring([
[-sw_x, 10, sw_z-8],
[-sw_x-1, 18, sw_z-8],
[-sw_x-1, 19, 10],
[-sw_x-1, -motor_rail_length/3.5-5+sw_y, 10],
[1, -motor_rail_length/3.5-5+sw_y, 10],
[1, -motor_rail_length/2-20+sw_y, 10],
], 1);
wiring([
[-sw_x, 10, sw_z+8],
[-sw_x-3, 18, sw_z+8],
[-sw_x-3, 19, 10],
[-sw_x-3, -motor_rail_length/3.5-5+sw_y-2, 10],
[-1, -motor_rail_length/3.5-5+sw_y-2, 10],
[-1, -motor_rail_length/2-20+sw_y, 10],
], 1, wirenum=1);
}
// Construction arrows.
if(arrows && explode>10) {
up(sw_z) {
left(sw_x) {
fwd(explode*1.3) {
zrot(-90) arrow(size=explode/3);
}
}
}
}
}
//!x_motor_segment_assembly_2(explode=100, arrows=true);
//!x_motor_segment_assembly_2();
module x_axis_assembly_1(slidepos=0, explode=0, arrows=false)
{
// view: [-5, 65, 85] [50, 0, 310] 1750
// desc: Join a rail segment to each end of a motor rail assembly, to make the X axis slider. Route the wiring to one end of the slider assembly. Apply mineral oil to the slider rail V-grooves for lubrication.
platform_vert_off = rail_height+groove_height/2;
zrot(-90) x_motor_segment_assembly_2();
zring(r=(motor_rail_length+rail_length+2*explode)/2, n=2) {
zrot(90) rail_segment();
}
up(12) {
wiring([
[-motor_rail_length/2, 0, 0],
[-(rail_length+explode), 0, 0],
[-(rail_length+explode+motor_rail_length/2)-30, 0, 0],
], 6);
}
// Construction arrows.
if(arrows && explode>10) {
up(rail_height/2+groove_height/2) {
zring(r=(motor_rail_length+explode)/2) {
arrow(size=explode/3);
}
}
}
// Left Z Tower
left(motor_rail_length/2+rail_length+2*explode) {
if ($children > 0) children(0);
}
// Right Z Tower
right(motor_rail_length/2+rail_length+2*explode) {
if ($children > 1) children(1);
}
// Sled
up(platform_vert_off) {
left(slidepos) {
if ($children > 2) children(2);
}
}
}
//!x_axis_assembly_1(slidepos=100, explode=100, arrows=true);
//!x_axis_assembly_1(slidepos=0) {sphere(1); sphere(1); sphere(1);}
module x_axis_assembly_2(explode=0, arrows=false)
{
// view: [0, 0, 0] [50, 0, 310] 1000
// desc: Join two XY sled parts together. Make sure the bottom racks line up. Lubricate the slider pinchers and gear rack teeth on the underside of the sled with mineral oil.
up(groove_height/2+rail_offset) {
xspread(platform_length+explode) {
zrot(90) yrot(180) xy_sled();
}
}
// Construction arrows.
if(arrows && explode>20) {
arrow(size=explode/3);
}
}
//!x_axis_assembly_2(explode=100, arrows=true);
module x_axis_assembly_3(explode=0, arrows=false)
{
// view: [-55, 60, 65] [55, 0, 55] 1500
// desc: Join the X sled cable-chain mount to the front/left side of the X sled endstop.
up(groove_height/2+rail_offset) {
left(explode/2) {
zrot(-90) xy_joiner();
right(explode*1.25+0.3) {
fwd((platform_width-joiner_width)/2) {
zrot(90) {
//cable_chain_xy_joiner_mount();
cable_chain_x_sled_mount();
}
}
}
}
}
// Construction arrows.
if(arrows && explode>20) {
up(groove_height/2+rail_offset+rail_height/4) {
fwd(platform_width/2-joiner_width/2) {
right(explode/3) {
arrow(size=explode/3);
}
}
}
}
}
//!x_axis_assembly_3(explode=100, arrows=true);
//!x_axis_assembly_3();
module x_axis_assembly_4(explode=0, arrows=false)
{
// view: [-55, 60, 65] [55, 0, 55] 1500
// desc: Join an X-Y joiner endcap to one end of the X sled central assembly.
x_axis_assembly_2();
left(platform_length+0.3+explode) {
x_axis_assembly_3();
}
// Construction arrows.
if(arrows && explode>20) {
left(platform_length+explode*0.6) {
zrot(180) arrow(size=explode/3);
}
}
}
//!x_axis_assembly_4(explode=100, arrows=true);
//!x_axis_assembly_4();
module x_axis_assembly_5(slidepos=0, explode=0, arrows=false)
{
// view: [-155, -50, 25] [50, 0, 310] 2500
// desc: Slide the X sled partial assembly onto the X axis rails assembly, so that it is centered.
x_axis_assembly_1(slidepos=slidepos) {
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
left(explode*5) {
x_axis_assembly_4();
if ($children>2) children(2); else nil();
// Construction arrows.
if(arrows && explode>75) {
right(platform_length+explode) {
zrot(180) arrow(size=explode/3);
}
}
}
}
}
//!x_axis_assembly_5(slidepos=0, explode=100, arrows=true);
//!x_axis_assembly_5();
module x_axis_assembly_6(xslidepos=0, yslidepos=0, explode=0, arrows=false)
{
// view: [150, 0, 110] [50, 0, 310] 2500
// desc: Connect the Y axis assembly to the XY joiner on the X axis partial assembly. Route the Y axis wiring through the front hole in the XY joiner.
x_axis_assembly_5(slidepos=xslidepos) {
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
right(explode*4) {
if ($children>2) children(2); else nil();
up(groove_height/2+rail_offset) {
y_axis_assembly_7(slidepos=yslidepos) {
if ($children>3) children(3);
}
}
// Construction arrows.
if(arrows && explode>75) {
left(explode*1.25) {
arrow(size=2*explode/3);
}
}
}
}
}
//!x_axis_assembly_6(explode=100, arrows=true);
//!x_axis_assembly_6();
module x_axis_assembly_7(xslidepos=0, yslidepos=0, explode=0, arrows=false)
{
// view: [85, 70, 40] [50, 0, 15] 2500
// desc: Join the other X sled endcap assembly to the end of the X sled assembly, fixing the Y sled assembly in place.
x_axis_assembly_6(xslidepos=xslidepos, yslidepos=yslidepos) {
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
right(platform_length+0.5+explode*3) {
up(groove_height/2+rail_offset) {
zrot(90) xy_joiner();
}
// Construction arrows.
if(arrows && explode>75) {
left(explode*1.25) {
arrow(size=explode/3);
}
}
}
if ($children>2) children(2);
}
}
//!x_axis_assembly_7(xslidepos=0, yslidepos=0, explode=100, arrows=true);
//!x_axis_assembly_7(xslidepos=platform_length*sin($t*360), yslidepos=0, explode=0, arrows=false);
module x_axis_assembly_8(xslidepos=0, yslidepos=0, explode=0, arrows=false)
{
// view: [-10, 0, 75] [55, 0, 310] 1100
// desc: Attach the cable chain joiner mount to the X motor segment, on the same side as the X sled cable chain joiner and Y axis wiring.
x_axis_assembly_7(xslidepos=xslidepos, yslidepos=yslidepos) {
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
if ($children>2) children(2);
}
fwd(rail_width/2+2+explode/2) {
left(side_mount_spacing/2) {
// Construction arrows.
if(arrows && explode>75) {
up(rail_height/2/2) {
zrot(-90) arrow(size=explode/3);
}
}
fwd(explode/2) {
zrot(90) cable_chain_joiner_mount();
}
}
}
}
//!x_axis_assembly_8(xslidepos=0, yslidepos=0, explode=100, arrows=true);
//!x_axis_assembly_8(xslidepos=platform_length*sin($t*360), yslidepos=0, explode=0, arrows=false);
module x_axis_assembly_9(xslidepos=0, yslidepos=0, explode=0, arrows=false)
{
// view: [-12, 0, 75] [62, 0, 345] 1400
// desc: Attach the cable-chain assembly (with 13 or 14 links) to the cable chain mounts on the X axis assembly, making sure to feed the Y-axis wiring through the cable chain. Route the wiring in through the wiring access hole beside the cable chain mount, then out through the end of the X axis assembly. You may need to lubricate each cable-chain pivot with mineral oil.
x_axis_assembly_8(xslidepos=xslidepos, yslidepos=yslidepos) {
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
if ($children>2) children(2);
}
vert_off = rail_height + groove_height + rail_offset + cable_chain_height/2;
left(explode*1.5) {
fwd(platform_width/2+cable_chain_width/2+2) {
fwd(15) {
// Construction arrows.
if(arrows && explode>75) {
left(platform_length+explode/6) {
up(vert_off) zrot(180) arrow(size=explode/3);
}
left(side_mount_spacing/2+explode/6) {
up(cable_chain_height/2) zrot(180) arrow(size=explode/3);
}
}
}
left(explode/2) {
cable_chain_assembly(
[-platform_length-1, 0, vert_off],
[-side_mount_spacing/2-cable_chain_length/2+cable_chain_height/3, 0, cable_chain_height/2],
[-1,0,0],
platform_length*2,
xslidepos,
wires=6
);
}
}
}
if (explode>0) {
fwd(platform_width/2+cable_chain_width/2+2) {
wiring([
[-platform_length-1-explode*2, 0, vert_off],
[-platform_length-1-explode, 0, vert_off],
[-platform_length-1, 0, vert_off],
], 6);
wiring([
[-side_mount_spacing/2-cable_chain_length/2+cable_chain_height/3-explode*2, 0, cable_chain_height/2],
[-side_mount_spacing/2-cable_chain_length/2+cable_chain_height/3-explode, 0, cable_chain_height/2],
[-side_mount_spacing/2-cable_chain_length/2+cable_chain_height/3, 0, cable_chain_height/2],
], 6);
}
}
wiring([
[-side_mount_spacing/2-cable_chain_length/2+cable_chain_height/3, -(platform_width/2+cable_chain_width/2+2), cable_chain_height/2],
[-motor_rail_length/3+10, -(platform_width/2+cable_chain_width/2+2), cable_chain_height/2],
[-motor_rail_length/3+5, -(rail_width/2+joiner_width/2), rail_thick+5],
[-motor_rail_length/3+5, -rail_width/3, rail_thick+5],
[-rail_length-motor_rail_length/2-30, -rail_width/3, rail_thick+5],
], 6);
}
//!x_axis_assembly_9(xslidepos=0, yslidepos=0, explode=100, arrows=true);
//!x_axis_assembly_9(xslidepos=platform_length*sin($t*360), yslidepos=0, explode=0, arrows=false);
//!x_axis_assembly_9(xslidepos=0, yslidepos=0, explode=0, arrows=false);
module lifter_assembly_1(explode=0, arrows=false) {
// view: [0, 0, -10] [240, 0, 330] 300
// desc: Press fit a nut into slot on the bottom of lifter coupler. Press into slot until it reaches the bottom.
lifter_coupler() {
nil();
union() {
down(explode/2) yrot(90) color("silver") metric_nut(size=set_screw_size, hole=true);
// Construction arrows.
if(arrows && explode>=50) {
down(explode/4) right(1.5) yrot(90) arrow(explode/6);
}
}
}
}
//!lifter_assembly_1(explode=100, arrows=true);
module lifter_assembly_2(explode=0, arrows=false) {
// view: [26, 0, 0] [230, 0, 315] 250
// desc: Thread a 3mm x 12mm screw just barely through the nut in the screwhole.
lifter_coupler() {
nil();
yrot(90) color("silver") metric_nut(size=set_screw_size, hole=true);
union() {
right(explode/2+1.9) yrot(90) color("dimgray") screw(screwsize=set_screw_size, screwlen=10, headsize=set_screw_size*2-0.5, headlen=set_screw_size);
// Construction arrows.
if(arrows && explode>=50) {
right(explode/4) arrow(explode/6);
}
}
}
}
//!lifter_assembly_2(explode=100, arrows=true);
module lifter_assembly_3(explode=0, arrows=false) {
// view: [110, -40, 60] [65, 0, 40] 1900
// desc: Press fit the lifter rod fully onto the top of the coupler. If it's loose at all, superglue them carefully together.
lifter_coupler() {
union() {
up(explode) lifter_rod();
// Construction arrows.
if(arrows && explode>=50) {
up(explode/2) yrot(-90) arrow(explode/3);
}
}
yrot(90) color("silver") metric_nut(size=set_screw_size, hole=true);
right(1.9) yrot(90) color("dimgray") screw(screwsize=set_screw_size, screwlen=10, headsize=set_screw_size*2-0.5, headlen=set_screw_size);
}
}
//!lifter_assembly_3(explode=100, arrows=true);
module lifter_assembly_4(explode=0, arrows=false) {
// view: [110, -40, 60] [65, 0, 40] 1900
// desc: Press fit another lifter rod fully onto the top of the lifter assembly. Superglue it carefully if it is at all loose.
lifter_coupler() {
lifter_rod() {
union() {
up(explode) lifter_rod();
// Construction arrows.
if(arrows && explode>=50) {
up(explode/2) yrot(-90) arrow(explode/3);
}
}
}
yrot(90) color("silver") metric_nut(size=set_screw_size, hole=true);
right(1.9) yrot(90) color("dimgray") screw(screwsize=set_screw_size, screwlen=10, headsize=set_screw_size*2-0.5, headlen=set_screw_size);
}
}
//!lifter_assembly_4(explode=100, arrows=true);
//!lifter_assembly_4();
module lifter_assembly_5(slidepos=0, explode=0, arrows=false) {
// view: [110, -40, 60] [65, 0, 40] 1900
// desc: Press fit the lifter rod assembly onto the stepper motor shaft, making sure the set screw is on the flatted side of the shaft. Tighten the set screw firmly. Apply mineral oil to the screw rod threads for lubrication.
up(5+explode) {
zrot(-360*slidepos/lifter_rod_pitch-90) {
lifter_assembly_4();
}
}
zrot(90) nema17_stepper(h=motor_length, shaft_len=motor_shaft_length);
// Construction arrows.
if(arrows && explode>=50) {
up(explode/2) yrot(-90) arrow(explode/3);
}
}
//!lifter_assembly_5(explode=100, arrows=true);
//!lifter_assembly_5();
module z_tower_assembly_1(slidepos=0, explode=0, arrows=false)
{
// view: [110, -40, 60] [65, 0, 40] 1900
// desc: Attach two Z rail segments together to make a Z tower rail assembly. Do this again to make a second tower. Superglue these together if they aren't attached firmly. Lubricate the slider rails and lifter screw slots with mineral oil.
zspread(rail_length + explode) {
yrot(90) zrot(90) z_rail();
}
if ($children > 0) {
up(slidepos-rail_height/2) {
right(rail_height+groove_height/2) {
children(0);
}
}
}
up(rail_length+2*explode) {
if (hide_endcaps == false) {
if ($children > 1) {
children(1);
}
}
}
// Construction arrows.
if (arrows && explode>50) {
right(rail_height/2+groove_height/2) {
yrot(-90) arrow(size=explode/3);
}
}
}
//!z_tower_assembly_1(explode=100, arrows=true);
//!z_tower_assembly_1() { z_sled(); rail_z_endcap(); }
//!z_tower_assembly_1();
// Child 0: Left Z tower motherboard mount point.
module z_tower_assembly_2(explode=0, arrows=false)
{
// view: [-110, 20, 80] [55, 0, 60] 1400
// desc: Attach support legs to each side of a YZ Joiner part. Do this again for a second YZ Joiner part.
zrot(-90) yz_joiner();
left(6+explode) {
if ($children > 0) zrot(-90) children(0);
}
right(platform_length/3) {
zrot_copies([0,180]) {
back(rail_width/2+14+explode) {
zrot(0) support_leg();
}
}
}
// Construction arrows.
if (arrows && explode>10) {
right(10+platform_length/2/2) {
up(rail_height/2+groove_height/2) {
zrot(90) zring(r=rail_width/2+explode*0.55) {
zrot(0) arrow(size=explode/3);
}
}
}
}
}
//!z_tower_assembly_2(explode=100, arrows=true);
//!z_tower_assembly_2();
//!z_tower_assembly_2() color("red") sphere(10);
// Child 0: Left Z tower motherboard mount point.
// Child 1: Left Z tower lifter motor mount point
module z_tower_assembly_3(explode=0, arrows=false)
{
// view: [-55, 0, 285] [70, 0, 65] 1700
// desc: Attach a Z base part to the top of each YZ joiner assembly, to make two tower base assemblies. Superglue these together if the attachment is wobbly in any way.
left(platform_length) {
z_tower_assembly_2() {
if ($children > 0) children(0);
}
up(rail_height+groove_height+z_base_height/2+explode) {
yrot(90) zrot(90) z_base();
right(rail_height+groove_height/2) {
up(z_base_height/2-16.5) {
if ($children > 1) children(1);
}
}
}
// Construction arrows.
if (arrows && explode>10) {
right(rail_height/2+groove_height/2) {
up(rail_height+groove_height+explode*0.5) {
yrot(-90) arrow(size=explode/3);
}
}
}
}
}
//!z_tower_assembly_3(explode=100, arrows=true);
//!z_tower_assembly_3() {nil(); lifter_assembly_5();}
//!z_tower_assembly_3();
// Child 0: Left Z tower motherboard mount point.
// Child 1: Left Z tower lifter motor mount point
module z_tower_assembly_4(explode=0, arrows=false)
{
// view: [-55, 0, 175] [60, 0, 115] 1200
// desc: Insert a microswitch into the tower base assembly. Route the wiring down to the base of the tower.
z_tower_assembly_3() {
if ($children > 0) children(0);
if ($children > 1) children(1);
}
up(rail_height+groove_height+z_base_height-endstop_depth/2+2*explode) {
back(z_joiner_spacing/2+joiner_width+7.5) {
left(platform_length-rail_height-groove_height/2) {
zrot(90) microswitch();
wiring([
[8, 0, -10],
[7, 0, -20],
[5-rail_height, 1, -z_base_height/2],
[5-rail_height, -9, -z_base_height/2-10],
[5-rail_height, -z_joiner_spacing/2-joiner_width/2-6.5, -z_base_height-rail_height+8],
[-rail_height-20, -z_joiner_spacing/2-joiner_width/2-6.5, -z_base_height-rail_height+8],
], 1, fillet=5, wirenum=4);
wiring([
[-8, 0, -10],
[-9, 0, -20],
[5-rail_height, -1, -z_base_height/2],
[5-rail_height, -10, -z_base_height/2-10],
[5-rail_height, -z_joiner_spacing/2-joiner_width/2-8.5, -z_base_height-rail_height+8],
[-rail_height-20, -z_joiner_spacing/2-joiner_width/2-8.5, -z_base_height-rail_height+8],
], 1, fillet=5, wirenum=5);
// Construction arrows.
if (arrows && explode>10) {
down(explode) {
yrot(-90) arrow(size=explode/3);