-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.html
995 lines (922 loc) · 78.1 KB
/
README.html
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
<!doctype html>
<html>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&subset=latin,latin-ext' rel='stylesheet' type='text/css' /><style type='text/css'>html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: "Lucida Console",Consolas,"Courier",monospace; --title-bar-height: 20px; }
.mac-os-11 { --title-bar-height: 28px; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { white-space: pre-wrap; }
body { margin: 0px; padding: 0px; height: auto; inset: 0px; font-size: 1rem; line-height: 1.42857; overflow-x: hidden; background: inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; overflow-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 36px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
.typora-export .task-list-item input { pointer-events: none; }
@media screen and (max-width: 500px) {
body.typora-export { padding-left: 0px; padding-right: 0px; }
#write { padding-left: 20px; padding-right: 20px; }
}
#write li > figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; image-orientation: from-image; }
button, input, select, textarea { color: inherit; font: inherit; }
input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgb(85, 85, 85); border-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure > table { margin: 0px; }
thead, tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right: 0px; background-color: inherit; }
.CodeMirror-linenumber { user-select: none; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background: inherit; position: relative !important; }
.md-fences-adv-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
svg { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; background: 0px 0px; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; -webkit-tap-highlight-color: transparent; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li blockquote { margin: 1rem 0px; }
li { margin: 0px; position: relative; }
blockquote > :last-child { margin-bottom: 0px; }
blockquote > :first-child, li > :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; }
#write { margin-top: 0px; border-color: transparent !important; padding-top: 0px !important; padding-bottom: 0px !important; }
.typora-export * { -webkit-print-color-adjust: exact; }
.typora-export #write { break-after: avoid; }
.typora-export #write::after { height: 0px; }
.is-mac table { break-inside: avoid; }
#write > p:nth-child(1) { margin-top: 0px; }
.typora-export-show-outline .typora-export-sidebar { display: none; }
figure { overflow-x: visible; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background: rgb(204, 204, 204); display: block; overflow-x: hidden; }
p > .md-image:only-child:not(.md-img-error) img, p > img:only-child { display: block; margin: auto; }
#write.first-line-indent p > .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; }
p > .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
.MathJax_ref { fill: currentcolor; }
[contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item > input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
.md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
.md-toc-h4 .md-toc-inner { margin-left: 5em; }
.md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
.md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.reversefootnote { font-family: ui-monospace, sans-serif; }
.md-attr { display: none; }
.md-fn-count::after { content: "."; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.6; font-family: var(--monospace); }
code { text-align: left; vertical-align: initial; }
a.md-print-anchor { white-space: pre !important; border-width: initial !important; border-style: none !important; border-color: initial !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; background: 0px 0px !important; text-decoration: initial !important; text-shadow: initial !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: "Segoe UI Symbol", sans-serif; }
.md-diagram-panel > svg { max-width: 100%; }
[lang="flow"] svg, [lang="mermaid"] svg { max-width: 100%; height: auto; }
[lang="mermaid"] .node text { font-size: 1rem; }
table tr th { border-bottom: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }
mark { background: rgb(255, 255, 0); color: rgb(0, 0, 0); }
.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; }
.md-expand mark .md-meta { opacity: 0.3 !important; }
mark .md-meta { color: rgb(0, 0, 0); }
@media print {
.typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; }
}
.md-diagram-panel .messageText { stroke: none !important; }
.md-diagram-panel .start-state { fill: var(--node-fill); }
.md-diagram-panel .edgeLabel rect { opacity: 1 !important; }
.md-fences.md-fences-math { font-size: 1em; }
.md-fences-advanced:not(.md-focus) { padding: 0px; white-space: nowrap; border: 0px; }
.md-fences-advanced:not(.md-focus) { background: inherit; }
.typora-export-show-outline .typora-export-content { max-width: 1440px; margin: auto; display: flex; flex-direction: row; }
.typora-export-sidebar { width: 300px; font-size: 0.8rem; margin-top: 80px; margin-right: 18px; }
.typora-export-show-outline #write { --webkit-flex: 2; flex: 2 1 0%; }
.typora-export-sidebar .outline-content { position: fixed; top: 0px; max-height: 100%; overflow: hidden auto; padding-bottom: 30px; padding-top: 60px; width: 300px; }
@media screen and (max-width: 1024px) {
.typora-export-sidebar, .typora-export-sidebar .outline-content { width: 240px; }
}
@media screen and (max-width: 800px) {
.typora-export-sidebar { display: none; }
}
.outline-content li, .outline-content ul { margin-left: 0px; margin-right: 0px; padding-left: 0px; padding-right: 0px; list-style: none; overflow-wrap: anywhere; }
.outline-content ul { margin-top: 0px; margin-bottom: 0px; }
.outline-content strong { font-weight: 400; }
.outline-expander { width: 1rem; height: 1.42857rem; position: relative; display: table-cell; vertical-align: middle; cursor: pointer; padding-left: 4px; }
.outline-expander::before { content: ""; position: relative; font-family: Ionicons; display: inline-block; font-size: 8px; vertical-align: middle; }
.outline-item { padding-top: 3px; padding-bottom: 3px; cursor: pointer; }
.outline-expander:hover::before { content: ""; }
.outline-h1 > .outline-item { padding-left: 0px; }
.outline-h2 > .outline-item { padding-left: 1em; }
.outline-h3 > .outline-item { padding-left: 2em; }
.outline-h4 > .outline-item { padding-left: 3em; }
.outline-h5 > .outline-item { padding-left: 4em; }
.outline-h6 > .outline-item { padding-left: 5em; }
.outline-label { cursor: pointer; display: table-cell; vertical-align: middle; text-decoration: none; color: inherit; }
.outline-label:hover { text-decoration: underline; }
.outline-item:hover { border-color: rgb(245, 245, 245); background-color: var(--item-hover-bg-color); }
.outline-item:hover { margin-left: -28px; margin-right: -28px; border-left: 28px solid transparent; border-right: 28px solid transparent; }
.outline-item-single .outline-expander::before, .outline-item-single .outline-expander:hover::before { display: none; }
.outline-item-open > .outline-item > .outline-expander::before { content: ""; }
.outline-children { display: none; }
.info-panel-tab-wrapper { display: none; }
.outline-item-open > .outline-children { display: block; }
.typora-export .outline-item { padding-top: 1px; padding-bottom: 1px; }
.typora-export .outline-item:hover { margin-right: -8px; border-right: 8px solid transparent; }
.typora-export .outline-expander::before { content: "+"; font-family: inherit; top: -1px; }
.typora-export .outline-expander:hover::before, .typora-export .outline-item-open > .outline-item > .outline-expander::before { content: "−"; }
.typora-export-collapse-outline .outline-children { display: none; }
.typora-export-collapse-outline .outline-item-open > .outline-children, .typora-export-no-collapse-outline .outline-children { display: block; }
.typora-export-no-collapse-outline .outline-expander::before { content: "" !important; }
.typora-export-show-outline .outline-item-active > .outline-item .outline-label { font-weight: 700; }
.md-inline-math-container mjx-container { zoom: 0.95; }
mjx-container { break-inside: avoid; }
.md-alert.md-alert-note { border-left-color: rgb(9, 105, 218); }
.md-alert.md-alert-important { border-left-color: rgb(130, 80, 223); }
.md-alert.md-alert-warning { border-left-color: rgb(154, 103, 0); }
.md-alert.md-alert-tip { border-left-color: rgb(31, 136, 61); }
.md-alert.md-alert-caution { border-left-color: rgb(207, 34, 46); }
.md-alert { padding: 0px 1em; margin-bottom: 16px; color: inherit; border-left: 0.25em solid rgb(0, 0, 0); }
.md-alert-text-note { color: rgb(9, 105, 218); }
.md-alert-text-important { color: rgb(130, 80, 223); }
.md-alert-text-warning { color: rgb(154, 103, 0); }
.md-alert-text-tip { color: rgb(31, 136, 61); }
.md-alert-text-caution { color: rgb(207, 34, 46); }
.md-alert-text { font-size: 0.9rem; font-weight: 700; }
.md-alert-text svg { fill: currentcolor; position: relative; top: 0.125em; margin-right: 1ch; overflow: visible; }
.md-alert-text-container::after { content: attr(data-text); text-transform: capitalize; pointer-events: none; margin-right: 1ch; }
.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background: inherit; }
.CodeMirror-scroll { overflow: auto hidden; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right: 1px solid rgb(221, 221, 221); background: inherit; white-space: nowrap; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background: inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background: inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; outline: 0px; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: auto hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 10px; z-index: 3; overflow-y: hidden; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; background: 0px 0px !important; border: none !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-radius: 0px; border-width: 0px; background: 0px 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; overflow-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; }
.CodeMirror-wrap pre { overflow-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right: 30px solid transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right: none; width: auto; }
.CodeMirror-linebackground { position: absolute; inset: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background: rgba(255, 255, 0, 0.4); }
span.cm-underlined { text-decoration: underline; }
span.cm-strikethrough { text-decoration: line-through; }
.cm-tw-syntaxerror { color: rgb(255, 255, 255); background-color: rgb(153, 0, 0); }
.cm-tw-deleted { text-decoration: line-through; }
.cm-tw-header5 { font-weight: 700; }
.cm-tw-listitem:first-child { padding-left: 10px; }
.cm-tw-box { border-style: solid; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-color: inherit; border-top-width: 0px !important; }
.cm-tw-underline { text-decoration: underline; }
@media print {
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}
:root {
--side-bar-bg-color: #fafafa;
--control-text-color: #777;
}
@include-when-export url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&subset=latin,latin-ext);
/* open-sans-regular - latin-ext_latin */
/* open-sans-italic - latin-ext_latin */
/* open-sans-700 - latin-ext_latin */
/* open-sans-700italic - latin-ext_latin */
html {
font-size: 16px;
-webkit-font-smoothing: antialiased;
}
body {
font-family: "Open Sans","Clear Sans", "Helvetica Neue", Helvetica, Arial, 'Segoe UI Emoji', sans-serif;
color: rgb(51, 51, 51);
line-height: 1.6;
}
#write {
max-width: 860px;
margin: 0 auto;
padding: 30px;
padding-bottom: 100px;
}
@media only screen and (min-width: 1400px) {
#write {
max-width: 1024px;
}
}
@media only screen and (min-width: 1800px) {
#write {
max-width: 1200px;
}
}
#write > ul:first-child,
#write > ol:first-child{
margin-top: 30px;
}
a {
color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
margin-top: 1rem;
margin-bottom: 1rem;
font-weight: bold;
line-height: 1.4;
cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
text-decoration: none;
}
h1 tt,
h1 code {
font-size: inherit;
}
h2 tt,
h2 code {
font-size: inherit;
}
h3 tt,
h3 code {
font-size: inherit;
}
h4 tt,
h4 code {
font-size: inherit;
}
h5 tt,
h5 code {
font-size: inherit;
}
h6 tt,
h6 code {
font-size: inherit;
}
h1 {
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
h2 {
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
/*@media print {
.typora-export h1,
.typora-export h2 {
border-bottom: none;
padding-bottom: initial;
}
.typora-export h1::after,
.typora-export h2::after {
content: "";
display: block;
height: 100px;
margin-top: -96px;
border-top: 1px solid #eee;
}
}*/
h3 {
font-size: 1.5em;
line-height: 1.43;
}
h4 {
font-size: 1.25em;
}
h5 {
font-size: 1em;
}
h6 {
font-size: 1em;
color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
margin: 0.8em 0;
}
li>ol,
li>ul {
margin: 0 0;
}
hr {
height: 2px;
padding: 0;
margin: 16px 0;
background-color: #e7e7e7;
border: 0 none;
overflow: hidden;
box-sizing: content-box;
}
li p.first {
display: inline-block;
}
ul,
ol {
padding-left: 30px;
}
ul:first-child,
ol:first-child {
margin-top: 0;
}
ul:last-child,
ol:last-child {
margin-bottom: 0;
}
blockquote {
border-left: 4px solid #dfe2e5;
padding: 0 15px;
color: #777777;
}
blockquote blockquote {
padding-right: 0;
}
table {
padding: 0;
word-break: initial;
}
table tr {
border: 1px solid #dfe2e5;
margin: 0;
padding: 0;
}
table tr:nth-child(2n),
thead {
background-color: #f8f8f8;
}
table th {
font-weight: bold;
border: 1px solid #dfe2e5;
border-bottom: 0;
margin: 0;
padding: 6px 13px;
}
table td {
border: 1px solid #dfe2e5;
margin: 0;
padding: 6px 13px;
}
table th:first-child,
table td:first-child {
margin-top: 0;
}
table th:last-child,
table td:last-child {
margin-bottom: 0;
}
.CodeMirror-lines {
padding-left: 4px;
}
.code-tooltip {
box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
border-top: 1px solid #eef2f2;
}
.md-fences,
code,
tt {
border: 1px solid #e7eaed;
background-color: #f8f8f8;
border-radius: 3px;
padding: 0;
padding: 2px 4px 0px 4px;
font-size: 0.9em;
}
code {
background-color: #f3f4f4;
padding: 0 2px 0 2px;
}
.md-fences {
margin-bottom: 15px;
margin-top: 15px;
padding-top: 8px;
padding-bottom: 6px;
}
.md-task-list-item > input {
margin-left: -1.3em;
}
@media print {
html {
font-size: 13px;
}
pre {
page-break-inside: avoid;
word-wrap: break-word;
}
}
.md-fences {
background-color: #f8f8f8;
}
#write pre.md-meta-block {
padding: 1rem;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border: 0;
border-radius: 3px;
color: #777777;
margin-top: 0 !important;
}
.mathjax-block>.code-tooltip {
bottom: .375rem;
}
.md-mathjax-midline {
background: #fafafa;
}
#write>h3.md-focus:before{
left: -1.5625rem;
top: .375rem;
}
#write>h4.md-focus:before{
left: -1.5625rem;
top: .285714286rem;
}
#write>h5.md-focus:before{
left: -1.5625rem;
top: .285714286rem;
}
#write>h6.md-focus:before{
left: -1.5625rem;
top: .285714286rem;
}
.md-image>.md-meta {
/*border: 1px solid #ddd;*/
border-radius: 3px;
padding: 2px 0px 0px 4px;
font-size: 0.9em;
color: inherit;
}
.md-tag {
color: #a7a7a7;
opacity: 1;
}
.md-toc {
margin-top:20px;
padding-bottom:20px;
}
.sidebar-tabs {
border-bottom: none;
}
#typora-quick-open {
border: 1px solid #ddd;
background-color: #f8f8f8;
}
#typora-quick-open-item {
background-color: #FAFAFA;
border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
border-style: solid;
border-width: 1px;
}
/** focus mode */
.on-focus-mode blockquote {
border-left-color: rgba(85, 85, 85, 0.12);
}
header, .context-menu, .megamenu-content, footer{
font-family: "Segoe UI", "Arial", sans-serif;
}
.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
visibility: visible;
}
.mac-seamless-mode #typora-sidebar {
background-color: #fafafa;
background-color: var(--side-bar-bg-color);
}
.mac-os #write{
caret-color: AccentColor;
}
.md-lang {
color: #b4654d;
}
/*.html-for-mac {
--item-hover-bg-color: #E6F0FE;
}*/
#md-notification .btn {
border: 0;
}
.dropdown-menu .divider {
border-color: #e5e5e5;
opacity: 0.4;
}
.ty-preferences .window-content {
background-color: #fafafa;
}
.ty-preferences .nav-group-item.active {
color: white;
background: #999;
}
.menu-item-container a.menu-style-btn {
background-color: #f5f8fa;
background-image: linear-gradient( 180deg , hsla(0, 0%, 100%, 0.8), hsla(0, 0%, 100%, 0));
}
mjx-container[jax="SVG"] {
direction: ltr;
}
mjx-container[jax="SVG"] > svg {
overflow: visible;
min-height: 1px;
min-width: 1px;
}
mjx-container[jax="SVG"] > svg a {
fill: blue;
stroke: blue;
}
mjx-assistive-mml {
position: absolute !important;
top: 0px;
left: 0px;
clip: rect(1px, 1px, 1px, 1px);
padding: 1px 0px 0px 0px !important;
border: 0px !important;
display: block !important;
width: auto !important;
overflow: hidden !important;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
mjx-assistive-mml[display="block"] {
width: 100% !important;
}
mjx-container[jax="SVG"][display="true"] {
display: block;
text-align: center;
margin: 1em 0;
}
mjx-container[jax="SVG"][display="true"][width="full"] {
display: flex;
}
mjx-container[jax="SVG"][justify="left"] {
text-align: left;
}
mjx-container[jax="SVG"][justify="right"] {
text-align: right;
}
g[data-mml-node="merror"] > g {
fill: red;
stroke: red;
}
g[data-mml-node="merror"] > rect[data-background] {
fill: yellow;
stroke: none;
}
g[data-mml-node="mtable"] > line[data-line], svg[data-table] > g > line[data-line] {
stroke-width: 70px;
fill: none;
}
g[data-mml-node="mtable"] > rect[data-frame], svg[data-table] > g > rect[data-frame] {
stroke-width: 70px;
fill: none;
}
g[data-mml-node="mtable"] > .mjx-dashed, svg[data-table] > g > .mjx-dashed {
stroke-dasharray: 140;
}
g[data-mml-node="mtable"] > .mjx-dotted, svg[data-table] > g > .mjx-dotted {
stroke-linecap: round;
stroke-dasharray: 0,140;
}
g[data-mml-node="mtable"] > g > svg {
overflow: visible;
}
[jax="SVG"] mjx-tool {
display: inline-block;
position: relative;
width: 0;
height: 0;
}
[jax="SVG"] mjx-tool > mjx-tip {
position: absolute;
top: 0;
left: 0;
}
mjx-tool > mjx-tip {
display: inline-block;
padding: .2em;
border: 1px solid #888;
font-size: 70%;
background-color: #F8F8F8;
color: black;
box-shadow: 2px 2px 5px #AAAAAA;
}
g[data-mml-node="maction"][data-toggle] {
cursor: pointer;
}
mjx-status {
display: block;
position: fixed;
left: 1em;
bottom: 1em;
min-width: 25%;
padding: .2em .4em;
border: 1px solid #888;
font-size: 90%;
background-color: #F8F8F8;
color: black;
}
foreignObject[data-mjx-xml] {
font-family: initial;
line-height: normal;
overflow: visible;
}
mjx-container[jax="SVG2"] path[data-c], mjx-container[jax="SVG2"] use[data-c] {
stroke-width: 3;
}
g[data-mml-node="xypic"] path {
stroke-width: inherit;
}
.MathJax g[data-mml-node="xypic"] path {
stroke-width: inherit;
}
mjx-container[jax="SVG"] path[data-c], mjx-container[jax="SVG"] use[data-c] {
stroke-width: 0;
}
</style><title>README</title>
</head>
<body class='typora-export os-windows'><div class='typora-export-content'>
<div id='write' class=''><h1 id='extrusion-3d-printer-with-integrated-laser-profile-sensor---in-nus'><span>Extrusion 3D printer with integrated laser profile sensor - in NUS</span></h1><div class='md-toc' mdtype='toc'><p class="md-toc-content" role="list"><span role="listitem" class="md-toc-item md-toc-h1" data-ref="n0"><a class="md-toc-inner" href="#extrusion-3d-printer-with-integrated-laser-profile-sensor---in-nus">Extrusion 3D printer with integrated laser profile sensor - in NUS</a></span><span role="listitem" class="md-toc-item md-toc-h2" data-ref="n4"><a class="md-toc-inner" href="#一简介introduction">一、简介(Introduction)</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n12"><a class="md-toc-inner" href="#如何从0开始搭建整个系统呢">如何从0开始搭建整个系统呢?</a></span><span role="listitem" class="md-toc-item md-toc-h2" data-ref="n27"><a class="md-toc-inner" href="#二结构structure">二、结构(Structure)</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n29"><a class="md-toc-inner" href="#1-运动控制平台motion-control-platform">(1) 运动控制平台(Motion Control Platform)</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n36"><a class="md-toc-inner" href="#1安装板">1)安装板</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n41"><a class="md-toc-inner" href="#2底座组件">2)底座组件</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n46"><a class="md-toc-inner" href="#3装配体">3)装配体</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n50"><a class="md-toc-inner" href="#2-挤出系统extrusion-system">(2) 挤出系统(Extrusion System)</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n52"><a class="md-toc-inner" href="#1气压分配器pressure-dispenser">1)气压分配器(Pressure Dispenser)</a></span><span role="listitem" class="md-toc-item md-toc-h5" data-ref="n55"><a class="md-toc-inner" href="#技术指标">技术指标:</a></span><span role="listitem" class="md-toc-item md-toc-h5" data-ref="n74"><a class="md-toc-inner" href="#使用安装说明">使用安装说明:</a></span><span role="listitem" class="md-toc-item md-toc-h5" data-ref="n79"><a class="md-toc-inner" href="#操作">操作:</a></span><span role="listitem" class="md-toc-item md-toc-h5" data-ref="n84"><a class="md-toc-inner" href="#参考资料">参考资料</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n89"><a class="md-toc-inner" href="#2-注射器针筒">2) 注射器针筒</a></span><span role="listitem" class="md-toc-item md-toc-h5" data-ref="n90"><a class="md-toc-inner" href="#三维模型">三维模型</a></span><span role="listitem" class="md-toc-item md-toc-h5" data-ref="n95"><a class="md-toc-inner" href="#手册">手册</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n100"><a class="md-toc-inner" href="#3-2d激光轮廓传感器2d-laser-profile-sensor">(3) 2D激光轮廓传感器(2D laser profile sensor)</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n103"><a class="md-toc-inner" href="#a-概况">a. 概况:</a></span><span role="listitem" class="md-toc-item md-toc-h5" data-ref="n105"><a class="md-toc-inner" href="#i-驱动器">i. 驱动器:</a></span><span role="listitem" class="md-toc-item md-toc-h5" data-ref="n108"><a class="md-toc-inner" href="#ii-传感器">ii. 传感器:</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n124"><a class="md-toc-inner" href="#b-通讯方式">b. 通讯方式:</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n128"><a class="md-toc-inner" href="#相关资料">相关资料:</a></span><span role="listitem" class="md-toc-item md-toc-h2" data-ref="n138"><a class="md-toc-inner" href="#三硬件hardware">三、硬件(Hardware)</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n140"><a class="md-toc-inner" href="#1-控制板-control-borard">(1) 控制板 Control borard</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n186"><a class="md-toc-inner" href="#2-电源">(2) 电源 </a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n190"><a class="md-toc-inner" href="#3-步进电机-step-motors">(3) 步进电机 Step Motors</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n194"><a class="md-toc-inner" href="#驱动器">驱动器</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n198"><a class="md-toc-inner" href="#接线">接线</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n203"><a class="md-toc-inner" href="#4-限位开关-endstops">(4) 限位开关 Endstops</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n208"><a class="md-toc-inner" href="#5-hotbed">(5) Hotbed</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n211"><a class="md-toc-inner" href="#6-pressure-switch-control">(6) Pressure switch control</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n213"><a class="md-toc-inner" href="#7-传感器驱动器-sensor-driver">(7) 传感器驱动器 Sensor Driver</a></span><span role="listitem" class="md-toc-item md-toc-h2" data-ref="n220"><a class="md-toc-inner" href="#四firmware---marlin">四、Firmware - Marlin</a></span><span role="listitem" class="md-toc-item md-toc-h2" data-ref="n237"><a class="md-toc-inner" href="#五软件-software">五、软件 Software</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n239"><a class="md-toc-inner" href="#1切片软件-slicing-software">(1)切片软件 Slicing software</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n240"><a class="md-toc-inner" href="#1slic3r">1)Slic3r</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n245"><a class="md-toc-inner" href="#2prusaslicer">2)PrusaSlicer</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n250"><a class="md-toc-inner" href="#2用户界面-user-interfacepronterface">(2)用户界面 user interface:pronterface </a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n254"><a class="md-toc-inner" href="#3lj-navigator">(3)LJ-Navigator</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n259"><a class="md-toc-inner" href="#4caxa-电子图版-2018-中文版">(4)CAXA 电子图版 2018 (中文版)</a></span><span role="listitem" class="md-toc-item md-toc-h2" data-ref="n261"><a class="md-toc-inner" href="#六配置">六、配置</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n262"><a class="md-toc-inner" href="#1-电脑环境的配置">1. 电脑环境的配置</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n264"><a class="md-toc-inner" href="#2-打印和挤出系统的配置">2. 打印和挤出系统的配置</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n265"><a class="md-toc-inner" href="#1连接">(1)连接:</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n267"><a class="md-toc-inner" href="#2确认端口号">(2)确认端口号:</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n270"><a class="md-toc-inner" href="#3通讯">(3)通讯:</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n273"><a class="md-toc-inner" href="#3-扫描系统的配置">3. 扫描系统的配置</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n274"><a class="md-toc-inner" href="#31-建立通讯">3.1 建立通讯</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n290"><a class="md-toc-inner" href="#32-截面获取">3.2 截面获取</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n291"><a class="md-toc-inner" href="#方法1lj-navigator软件">方法1:LJ-Navigator软件</a></span><span role="listitem" class="md-toc-item md-toc-h4" data-ref="n298"><a class="md-toc-inner" href="#方法2matlab代码处理数据信息相关代码在下一节介绍">方法2:MATLAB代码处理数据信息(相关代码在下一节介绍)</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n348"><a class="md-toc-inner" href="#33-使用技巧">3.3 使用技巧</a></span><span role="listitem" class="md-toc-item md-toc-h2" data-ref="n352"><a class="md-toc-inner" href="#七程序和代码">七、程序和代码</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n353"><a class="md-toc-inner" href="#1-截面获取">1. 截面获取</a></span><span role="listitem" class="md-toc-item md-toc-h2" data-ref="n363"><a class="md-toc-inner" href="#八example-how-to-use">八、Example (How to use)</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n364"><a class="md-toc-inner" href="#1打印一个立方体">(1)打印一个立方体</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n365"><a class="md-toc-inner" href="#2获得一个截面轮廓">(2)获得一个截面轮廓</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n366"><a class="md-toc-inner" href="#3按照指定轨迹获取轮廓">(3)按照指定轨迹获取轮廓</a></span><span role="listitem" class="md-toc-item md-toc-h3" data-ref="n367"><a class="md-toc-inner" href="#4设计打印轨迹并在打印后扫描然后输出点云文件">(4)设计打印轨迹并在打印后扫描,然后输出点云文件</a></span><span role="listitem" class="md-toc-item md-toc-h1" data-ref="n368"><a class="md-toc-inner" href="#参考文献">参考文献</a></span></p></div><p> </p><h2 id='一简介introduction'><span>一、简介(Introduction)</span></h2><p><span>2D激光轮廓传感器(2D Laser profile sensor)集成到3D打印机中以实现3D扫描,如下所示。</span></p><p><span>该系统由传感器、运动控制平台(motion control platform)和气动挤压系统(pneumatic extrusion system)组成,通过以太网(Ethernet)或串口(Serial Port)与PC机连接。</span></p><p><span>打印Gcode由开源切片软件生成,并由开源用户界面(UI)软件读取和发送。</span></p><p><span>打印时,命令由PC通过串口发送到控制板,在控制板(control board)上解码并执行。</span></p><p><span>在matlab中编写了一套实现扫描功能的程序。</span></p><p><span>扫描时需要运动与传感器的协调,PC通过串口控制运动平台移动一步,再通过以太网与传感器通讯获取截面,如此循环直至扫描完成。</span></p><p><img src="images/Figure_01.jpg" referrerpolicy="no-referrer" alt="image">
<span>图1 系统框图</span></p><h3 id='如何从0开始搭建整个系统呢'><span>如何从0开始搭建整个系统呢?</span></h3><ol start='' ><li><p><span>购买/制造相应的组件,并按照设计进行装配</span></p></li><li><p><span>确定各个端子的对应情况,并完成接线</span></p></li><li><p><span>完成PC的环境准备、打印系统和扫描系统的配置</span></p><ol start='' ><li><p><span>电脑环境的准备</span></p></li><li><p><span>打印和挤出系统的配置</span></p></li><li><p><span>扫描系统的配置</span></p></li></ol></li></ol><h2 id='二结构structure'><span>二、结构(Structure)</span></h2><p><span>本节将介绍系统内部的主要结构。</span></p><h3 id='1-运动控制平台motion-control-platform'><span>(1) 运动控制平台(Motion Control Platform)</span></h3><p><span>运动控制平台是一个三轴钻床的基础上改装的。</span></p><p><img src="images/Figure_02.png" referrerpolicy="no-referrer" alt="image"></p><p><span>图2 运动平台(原始) </span></p><p><span>定制了如下组件:</span></p><p><img src="images/Figure_03.png" referrerpolicy="no-referrer" alt="image"></p><p><span>图3 改造示意图 </span></p><h4 id='1安装板'><span>1)安装板</span></h4><p><span>介绍:安装在Z轴滑板上的安装板,将注射器针筒和2D轮廓传感器安装在它上面。</span></p><p><img src="images/image.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>制造:3D打印(FDM),工程塑料。</span></p><p><span>模型 3D Model:</span><a href='3Dmodels/STL/安装板 - PlanB.STL'><span>click to get stl file</span></a></p><h4 id='2底座组件'><span>2)底座组件</span></h4><p><span>介绍:由基板、调节装置和底座构成。</span></p><p><img src="images/image-2.png" referrerpolicy="no-referrer" alt="alt text">
<img src="images/image-5.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>制造:底座材料为不锈钢,通过激光切割和折弯制造。其余部件可直接采购。</span></p><p><span>模型 3D Model:</span><a href='3Dmodels/STL/底座.STL'><span>click to get stl file</span></a></p><h4 id='3装配体'><span>3)装配体</span></h4><p><img src="images/96eef40f671b49c1fc0b6fbc2e41abf.jpg" referrerpolicy="no-referrer" alt="alt text"></p><p><span>图4 运动平台(改造后)</span></p><p><span>装配体 Assembly:</span><a href='3Dmodels\STP\Assembly - Carriage-Z.STEP'><span>click to get stl file</span></a></p><h3 id='2-挤出系统extrusion-system'><span>(2) 挤出系统(Extrusion System)</span></h3><p><span>挤出系统由气压分配器和挤出装置构成。气泵可根据实验室条件选购。</span></p><h4 id='1气压分配器pressure-dispenser'><span>1)气压分配器(Pressure Dispenser)</span></h4><p><img src="images/cfa0d4b07e01fc85164b0fa47500455.jpg" referrerpolicy="no-referrer" alt="alt text"></p><p><span>图5 气压分配器</span></p><h5 id='技术指标'><span>技术指标:</span></h5><ol start='' ><li><p><span>吐出方式:16种自由设定方式、带吐出时间显示*</span></p></li><li><p><span>自动定时吐出:00.01S-99.99S</span></p></li><li><p><span>吐出间隔时间:0.1-9.9S(自动定时功能)</span></p></li><li><p><span>输入电压:220V±10% 50Hz/110V±10% 60Hz</span></p></li><li><p><span>内部电压:12VDC/24VDC</span></p></li><li><p><span>输入气压:10-100pSi</span></p></li><li><p><span>输出气压:1-80 pSi</span></p></li><li><p><span>外形尺寸:235×225×63mm</span></p></li><li><p><span>重量:2.8kg</span></p></li></ol><h5 id='使用安装说明'><span>使用安装说明:</span></h5><p><span>位于背部的SETUP四位吐出时间编程器拨码开关,通过拨动其可作16种出方式选择模式组合设定如下:</span></p><table>
<capital>模式组合</capital>
<tr>
<th rowspan=2 align="center">序号</th>
<th colspan=4 align="center"> 模式开关状态</th>
<th rowspan=2 align="center">吐出方式及工作对应功能</th>
</tr>
<tr>
<th align="center">S1</th>
<th align="center">S2</th>
<th align="center">S3</th>
<th align="center">S4</th>
</tr>
<tr>
<th align="center">1</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="left"> 点动模式,按下/踩下并保持以维持挤出</th>
</tr>
<tr>
<th align="center">2</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="left"> 保持模式,按下/踩下1次开关,按照设定的时间持续挤出;再按下/踩下1次开关停止挤出。</th>
</tr>
<tr>
<th align="center">3</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="left"> 点动计时模式,按下/踩下并保持以维持挤出设定的时间</th>
</tr>
<tr>
<th align="center">4</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="left"> 按照设定的时间自动定时连续挤出</th>
</tr>
<tr>
<th align="center">5</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出1次。</th>
</tr>
<tr>
<th align="center">6</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出2次。</th>
</tr>
<tr>
<th align="center">7</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出3次。</th>
</tr>
<tr>
<th align="center">8</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出4次。</th>
</tr>
<tr>
<th align="center">9</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出5次。</th>
</tr>
<tr>
<th align="center">10</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出6次。</th>
</tr>
<tr>
<th align="center">11</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出7次。</th>
</tr>
<tr>
<th align="center">12</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出8次。</th>
</tr>
<tr>
<th align="center">13</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出9次。</th>
</tr>
<tr>
<th align="center">14</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出10次。</th>
</tr>
<tr>
<th align="center">15</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出11次。</th>
</tr>
<tr>
<th align="center">16</th>
<th align="center">Off</th>
<th align="center">Off</th>
<th align="center">On</th>
<th align="center">On</th>
<th align="left"> 按下/踩下1次开关,按设定时间挤出12次。</th>
</tr>
</table><p><span>实际使用的模式为序号1.</span></p><h5 id='操作'><span>操作:</span></h5><ol start='' ><li><p><span>调压:通过调节黑色旋钮调节气压</span></p></li><li><p><span>开关:可以按下左侧红色小按钮进行手动调节,也可以外接踏板手动调节(这个接口被改造用于程序控制);控制方式在手册中有详细说明。</span></p></li></ol><h5 id='参考资料'><span>参考资料</span></h5><ol start='' ><li><p><a href='Docs/JND-983A点胶机详细功能设置.docx'><span>手册</span></a></p></li></ol><h4 id='2-注射器针筒'><span>2) 注射器针筒</span></h4><h5 id='三维模型'><span>三维模型</span></h5><ol start='' ><li><p><a href='3Dmodels/SLDPRT/syringe.zip'><span>针筒</span></a></p></li><li><p><a href='3Dmodels/SLDPRT/tips.rar'><span>喷嘴</span></a></p></li></ol><h5 id='手册'><span>手册</span></h5><ol start='' ><li><p><a href='Docs/技术表格.pdf'><span>喷嘴型号</span></a></p></li></ol><h3 id='3-2d激光轮廓传感器2d-laser-profile-sensor'><span>(3) 2D激光轮廓传感器(2D laser profile sensor)</span></h3><p><img src="images/image-3.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>图6 激光轮廓传感器</span></p><h4 id='a-概况'><span>a. 概况:</span></h4><p><span>使用的是基恩士2D激光轮廓传感器,驱动器型号为LJ-G5001,传感器型号为LJ-G030.</span></p><h5 id='i-驱动器'><span>i. 驱动器:</span></h5><p><span>驱动器基本安装尺寸如下所示:</span></p><p><img src="images/image-5 (2).png" referrerpolicy="no-referrer" alt="alt text"></p><h5 id='ii-传感器'><span>ii. 传感器:</span></h5><ol start='' ><li><p><span>安装尺寸:</span></p></li></ol><p><img src="images/屏幕截图 2024-07-26 221343.png" referrerpolicy="no-referrer" alt="alt text"></p><ol start='2' ><li><p><span>测量原理及测量范围</span>
<span>激光轮廓传感器采用激光三角反射式原理:激光束被放大形成一条激光线投射到被测物体表面上,反射光透过高质量光学系统,被投射到成像矩阵上,经过计算得到传感器到被测表面的距离(Z 轴)和沿着激光线的位置信息(X 轴)。移动被测物体或轮廓仪探头,就可以得到一组三维测量值。</span></p></li></ol><p><img src="images/屏幕截图 2024-07-26 221117.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>对于LJ-G030侧头,其有效测量区域为一个梯形,如下图所示:</span></p><p><img src="images/image-2 (2).png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>Z向测量范围:侧头下方30mm ± 10 mm;X向测量范围为 ±11 mm。</span></p><ol start='3' ><li><p><span>测量精度:</span>
<span>Z向测量精度:1 μm. X向测量精度:5 μm。</span></p></li></ol><p><img src="images/屏幕截图 2024-07-26 221755.png" referrerpolicy="no-referrer" alt="alt text"></p><h4 id='b-通讯方式'><span>b. 通讯方式:</span></h4><p><span>USB、串口、以太网。其中只有以太网通讯可以定制化传输轮廓数据。其他详情参见手册。</span>
<span>这里展示部分内容:</span></p><p><img src="images/image-7 (2).png" referrerpolicy="no-referrer" alt="alt text"></p><p><img src="images/image-9.png" referrerpolicy="no-referrer" alt="alt text"></p><h4 id='相关资料'><span>相关资料:</span></h4><ol start='' ><li><p><a href='Docs/01 AS_79826_LJ-G_UM_96M13960_CN_1059-7.pdf'><span>用户手册</span></a></p></li><li><p><a href='Docs/01 LJG5000_LAN.pdf'><span>以太网通讯协议</span></a></p></li><li><p><a href='Docs/LJ-G015(K)_2.x_t'><span>LJ-G015 3D模型</span></a></p></li><li><p><a href='Docs/LJ-G030_2.x_t'><span>LJ-G030 3D模型</span></a></p></li></ol><h2 id='三硬件hardware'><span>三、硬件(Hardware)</span></h2><p><span>这一节主要介绍接线和相关电路。</span></p><h3 id='1-控制板-control-borard'><span>(1) 控制板 Control borard</span></h3><p><span>控制板采用了</span><a href='https://makerbase.com.cn/'><span>创客基地(MakerBase)</span></a><span>的</span><a href='https://github.com/makerbase-mks/MKS-Monster8'><span>MKS-Monster8</span></a><span>控制板。该控制板支持Marlin、Klipper等主流3D打印固件。</span></p><p><img src="images/控制板基本介绍.jpg" referrerpolicy="no-referrer" alt="alt text"></p><p><span>基本技术参数如下:</span></p><ul><li><p><span>MCU: STM32F407VET6, 168MHz, 512K flash, 192KB RAM</span></p></li><li><p><span>供电:DC12-24V input(2 MP1584EN Output DC12V(For FANs) and DC5V)</span></p></li><li><p><span>3 PWM FANs + 3 power output(all power can be select by jumper and select VIN, dc12V, dc5V)</span></p></li><li><p><span>axis drivers and 9 motor interface(Driver0,1,2-1,2-2,3,4,5,6,7)</span></p></li><li><p><span>EXP1,EXP2 support MKS MINI12864,MKS TS35,LCD12864,LCD2004</span></p></li><li><p><span>USART(usart1:PA9,PA10) support MKS H43 or for other serial communication</span></p></li><li><p><span>6 endstop support power select(X-,X+,Y-,Y+,Z-,Z+) and 3D TOUCH(PA8) interface</span></p></li><li><p><span>4K eeprom on board(connect to I2C)</span></p></li><li><p><span>Built-in CAN transceiver and interface(connect to CAN)</span></p></li><li><p><span>Integrated SPI communication microsd card and reserved SPI signal interface</span></p></li><li><p><span>Integrated UDISK</span></p></li><li><p><span>Integrated virtural USB device</span></p></li><li><p><span>Support TMC UART and SPI mode, SENSORLESS_HOMING function(Diag0-5,connect to X-,Y-,Z-,X+,Y+,Z+)</span></p></li><li><p><span>Support driver power select(5V or 3.3V)</span></p></li><li><p><span>Has TVS power spike protection</span></p></li><li><p><span>Possess power reverse connection protection function</span></p></li><li><p><span>Support DFU mode set by button(Boot0)</span></p></li></ul><p><img src="images/image-6.png" referrerpolicy="no-referrer" alt="alt text">
<img src="images/image-7.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>但是,我们的平台需要使用的为X、Y、Z三轴的控制、无挤出加热需求、预留基板(substrate)的加热板(hot bed),将风扇控制口留作气压开关(switch)控制,限位开关。综合上述考虑,大体的接线方案如下:</span></p><p><img src="images/接线-控制板.jpg" referrerpolicy="no-referrer" alt="alt text"></p><p><span>接线图</span></p><p><img src="images/接线-控制板1.jpg" referrerpolicy="no-referrer" alt="alt text"></p><p><span>接线图-补充</span></p><p><span>接下来我将结合这个整体接线图来说明各个部分是如何连接到控制板上的。</span></p><h3 id='2-电源'><span>(2) 电源 </span></h3><p><span>电源用的就是很常见的220V交流输入,24V直流输出的电源。</span></p><p><img src="images/image-8.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>图9 直流电源 Figure 9 DC power supply</span></p><h3 id='3-步进电机-step-motors'><span>(3) 步进电机 Step Motors</span></h3><p><span>所使用的点击为57步进电机。</span></p><p><span>步进电机首先与驱动器相连,驱动器需要接电源,并与控制板相连。</span></p><p><span>其控制方式为位置控制模式,即每发送一个脉冲,步进电机根据驱动器的设定转动特定的角度。对于57步进电机来说,步距角θ为0.8°(即1个脉冲对应电机轴转动0.8°),驱动可以设置系分数n,从而使得步距角变为θ/n,从而提高运动精度。只不过这种提升也是有限度的,通常认为细分数大于32时,对精度提升的效果会变得有限,细分数高于32时,主要的贡献在于提高运动的平稳性。</span></p><h4 id='驱动器'><span>驱动器</span></h4><p><span>所使用的驱动器没有看到品牌和型号,但是将其设置面板抄了下来:</span></p><p><img src="images/接线-不进驱动.jpg" referrerpolicy="no-referrer" alt="alt text"></p><p><span>可以通过调整驱动器的拨码开关来调整电流峰值和细分数。突出显示的是原有配置,我沿用了该配置。</span></p><h4 id='接线'><span>接线</span></h4><p><span>原先的接线方式如下:</span></p><p><img src="images/原有线序-步进电机.jpg" referrerpolicy="no-referrer" alt="alt text"></p><p><span>参照原有接线方式进行接线。需要指出的是,使用了一个转接板直插到控制板上,然后再进行接线,公共端(COM)接地,其他的包括使能(Enable)、脉冲(Pulus)、方向(Direction)。并且线缆颜色与下图一一对应:</span></p><p><img src="images/接线-步进电机.jpg" referrerpolicy="no-referrer" alt="alt text"></p><h3 id='4-限位开关-endstops'><span>(4) 限位开关 Endstops</span></h3><p><span>光电传感器,型号未知。根据原有接线方案调整:</span></p><p><img src="images/原有线序-步进电机 - 副本.jpg" referrerpolicy="no-referrer" alt="alt text"></p><p><span>在实际调试过程中,发现原有的vcc 5V无法满足使用需要,有时候会出现电压不足的问题,且传感器上标识的工作电压为0~24V,因此选用24V电压作为供电。</span></p><p><span>可以在概览图中看到,在“接线图-补充”中,提到了Z+ endstop voltage selection, 在这里调整条线接法就能调整施加电压。</span></p><h3 id='5-hotbed'><span>(5) Hotbed</span></h3><p><span>热床尺寸为210mm × 210mm</span></p><p><span>参考“接线图”进行接线即可,另外热床上有一个100k热敏电阻,需要借到“接线图-补充”中的TB处。</span></p><h3 id='6-pressure-switch-control'><span>(6) Pressure switch control</span></h3><p><span>气压开关控制通过Controllable Fan端口控制,电压调整为24V,并接到继电器模块上,另外一端接到气压分配器(pressure dispenser)上,进而进行气压的开关控制(switch control)。</span></p><h3 id='7-传感器驱动器-sensor-driver'><span>(7) 传感器驱动器 Sensor Driver</span></h3><p><img src="images/image-3 (2).png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>驱动器的接线方式参见上图:</span></p><p><span>①激光轮廓传感器需要接直流电源,电压为24V。</span></p><p><span>②可接显示器(VGA)观察轮廓信息。</span></p><p><span>③以太网口连接到路由器上从而与PC连接。也预留USB、RS232可以连接PC。</span></p><p><span>④传感器连接线。</span></p><h2 id='四firmware---marlin'><span>四、Firmware - Marlin</span></h2><p><a href='https://marlinfw.org/'><span>Marlin</span></a><span>是最常用的开源3D打印固件,我们对其进行了相应修改,以满足设备使用:</span></p><ol start='' ><li><p><span>启用G05样条插补</span></p></li><li><p><span>启用XYZ3个轴,并设定脉冲当量(每个轴移动1mm对应的脉冲数)</span></p></li><li><p><span>关闭挤出机冷挤出限制(禁用温度传感器,设置最低挤出温度为0℃)</span></p></li><li><p><span>按照实际行程范围调整配置打印范围。</span></p></li><li><p><span>设置回零方向为X-,Y-,Z+</span></p></li></ol><p><span>编程环境:VScode环境下使用PlatformIO插件。</span></p><p><span>Marlin官网:</span><a href='https://marlinfw.org/' target='_blank' class='url'>https://marlinfw.org/</a></p><p><span>原始Marlin资源:</span><a href='https://github.com/MarlinFirmware/Configurations/tree/release-2.1.2.4' target='_blank' class='url'>https://github.com/MarlinFirmware/Configurations/tree/release-2.1.2.4</a></p><p><span>定制Marlin资源:</span><a href='https://lecloud.lenovo.com/share/2JQMt9CWcRS9uVE4x' target='_blank' class='url'>https://lecloud.lenovo.com/share/2JQMt9CWcRS9uVE4x</a><span> (密码:pgjg)</span></p><h2 id='五软件-software'><span>五、软件 Software</span></h2><p><span>这里分享使用的相关软件:</span></p><h3 id='1切片软件-slicing-software'><span>(1)切片软件 Slicing software</span></h3><h4 id='1slic3r'><span>1)Slic3r</span></h4><p><span>Slic3r是款开源切片软件,但是其已经停止开发了,所以存在一些bug。</span></p><p><span>官网:</span><a href='https://slic3r.org/' target='_blank' class='url'>https://slic3r.org/</a></p><p><img src="images/scli3r.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>图13 Slic3r界面</span></p><h4 id='2prusaslicer'><span>2)PrusaSlicer</span></h4><p><span>是Slic3r的一个分支,目前仍然在开发,并且其社区相对活跃。之前使用Slic3r,但是因为BUG太多,现在已经转为使用PrusaSlicer。</span></p><p><span>官网:</span><a href='https://www.prusa3d.com/page/prusaslicer_424/' target='_blank' class='url'>https://www.prusa3d.com/page/prusaslicer_424/</a></p><p><img src="images/PrusaSlicer.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>图14 PrusaSlicer界面</span></p><h3 id='2用户界面-user-interfacepronterface'><span>(2)用户界面 user interface:pronterface </span></h3><p><span>官网:</span><a href='https://www.pronterface.com/' target='_blank' class='url'>https://www.pronterface.com/</a></p><p><img src="images/pronterface.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>图15 界面</span></p><h3 id='3lj-navigator'><span>(3)LJ-Navigator</span></h3><p><span>基恩士激光轮廓传感器的官方软件,可以用来测试传感器和配置相关参数。</span></p><p><img src="images/ljnavigator.png" referrerpolicy="no-referrer" alt="alt text"></p><p><span>图16 界面</span></p><p><span>安装包:</span><a href='Docs/基恩士软件.rar'><span>LJ-Navigator</span></a></p><h3 id='4caxa-电子图版-2018-中文版'><span>(4)CAXA 电子图版 2018 (中文版)</span></h3><p><span>用于绘制打印、扫描轨迹</span></p><h2 id='六配置'><span>六、配置</span></h2><h3 id='1-电脑环境的配置'><span>1. 电脑环境的配置</span></h3><p><span>系统:Windows 7/8/10/11都可以</span>
<span>软件:PrusaSlicer、pronterface、LJ-Navigator、CAXA、MATLAB。</span></p><h3 id='2-打印和挤出系统的配置'><span>2. 打印和挤出系统的配置</span></h3><h3 id='1连接'><span>(1)连接:</span></h3><p><span> </span><span>将PC和控制板连接起来</span></p><h3 id='2确认端口号'><span>(2)确认端口号:</span></h3><p><span> </span><span>此电脑[右击]→管理[打开“计算机管理”]→点击设备管理器→查看端口(找到连接控制板后新出现的端口,记住它)</span></p><p><img src="images/QQ_1722011347970.png" referrerpolicy="no-referrer" alt="alt text"></p><h3 id='3通讯'><span>(3)通讯:</span></h3><p><span> </span><span>打开"pronterface"然后选择刚才的端口号,配置波特率(默认250000)→连接</span>
<span></span><span> </span><span>然后就可以开始进行控制了,可以测试一下XYZ方向的移动,以及回零(测试限位开关),以及气压开关控制(手动输入M106/M107或如图配置两个按钮)。</span></p><p><img src="images/QQ_1722011575548.png" referrerpolicy="no-referrer" alt="alt text"></p><h3 id='3-扫描系统的配置'><span>3. 扫描系统的配置</span></h3><h3 id='31-建立通讯'><span>3.1 建立通讯</span></h3><p><span>(1)网络环境设置:[电脑],关闭Wi-Fi,只连接以太网</span></p><p><span>(2)确定局域网IP:[电脑],Win+R打开cmd(命令提示符),输入arp -a,找到接口,确定IP地址前几位为192.168.0.xxx/或者192.168.1.xxx</span></p><p><span>(3)设置驱动器IP:</span></p><p><span> </span><strong><span>方法1</span></strong><span>:[驱动器],在驱动器上用手柄控制进行设定:在传感器驱动器上:设定IP地址为192.168.0.xxx/或192.168.1.xxx(一般为101,如果101连不上,可以改为102,以此类推),重启设备,等待一会(更新配置),注意不要保持在环境设置的界面。</span></p><p><span> </span><strong><span>方法2</span></strong><span>:[电脑],使用USB连接后用LJ-Navigator进行设置。打开LJ-Navigator,选择合适的预设文件,然后选择好通讯方式(USB),接着接收设置。然后参考方法1进行IP地址的设置,完成后发送设置后重启即可。</span></p><p><img src="images/image-20240819165403294.png" referrerpolicy="no-referrer" alt="image-20240819165403294"></p><p><span>(4)软件设置:[电脑],打开LJ-Navigator进行通讯设定。</span></p><ul><li><p><span>打开LJ-Navigator后,选择使用默认设置,然后选择对应的激光轮廓传感器(如G015):</span></p></li><li><p><span>通讯设定→PC通讯设定:选择通过以太网通讯,然后选择链接控制器,再点击检查控制器,稍等,然后点击下拉菜单,从而刷新局域网内的设备,若出现了刚才设定的IP则说明设定成功(传感器已经成功连入局域网)</span></p></li><li><p><span>点击Receive settings from controller,读取驱动器设定,从而测试连接。</span></p></li></ul><p><img src="images/image-20240819165446998.png" referrerpolicy="no-referrer" alt="image-20240819165446998"></p><h3 id='32-截面获取'><span>3.2 截面获取</span></h3><h4 id='方法1lj-navigator软件'><span>方法1:LJ-Navigator软件</span></h4><ol start='' ><li><p><span>点击View profile,点击开始预览,从而获取显示扫描图像</span></p></li><li><p><span>点击CSV output,输出800个z坐标信息(单位为mm,但会有错误点,错误点用-999.999表示,需剔除错误点)</span></p></li></ol><p><img src="images/image-20240819165701802.png" referrerpolicy="no-referrer" alt="image-20240819165701802"></p><h4 id='方法2matlab代码处理数据信息相关代码在下一节介绍'><span>方法2:MATLAB代码处理数据信息(相关代码在下一节介绍)</span></h4><ol start='' ><li><p><span>在cmd中输入arp -a, 确定已经找到设定的IP(如果找不到的话:打开LJ-Navigator软件,测试能够正常通讯和查看截面,然后关闭软件)</span></p></li><li><p><span>关闭所有程序和窗口</span></p></li><li><p><span>在MATLAB中使用编写的函数通讯,处理数据,绘制截面。其中函数的语法为:</span></p><p><code>[coordinate,profile]=LJ_G5000_v1_2(ip,a)</code></p><p><span>其中:</span></p><p><span>profile 是轮廓上各个点的高度数据,该数据为16位带符号的二进制数,最高位用于表示符号,后面15位用于表示数值,因此最大为</span></p><div contenteditable="false" spellcheck="false" class="mathjax-block md-end-block md-math-block md-rawblock" id="mathjax-n309" cid="n309" mdtype="math_block" data-math-tag-before="0" data-math-tag-after="0" data-math-labels="[]"><div class="md-math-container"><mjx-container class="MathJax" jax="SVG" display="true" style="position: relative;"><svg xmlns="http://www.w3.org/2000/svg" width="11.592ex" height="2.185ex" role="img" focusable="false" viewBox="0 -883.9 5123.7 965.9" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" style="vertical-align: -0.186ex;"><defs><path id="MJX-1-TEX-N-32" d="M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z"></path><path id="MJX-1-TEX-N-31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"></path><path id="MJX-1-TEX-N-35" d="M164 157Q164 133 148 117T109 101H102Q148 22 224 22Q294 22 326 82Q345 115 345 210Q345 313 318 349Q292 382 260 382H254Q176 382 136 314Q132 307 129 306T114 304Q97 304 95 310Q93 314 93 485V614Q93 664 98 664Q100 666 102 666Q103 666 123 658T178 642T253 634Q324 634 389 662Q397 666 402 666Q410 666 410 648V635Q328 538 205 538Q174 538 149 544L139 546V374Q158 388 169 396T205 412T256 420Q337 420 393 355T449 201Q449 109 385 44T229 -22Q148 -22 99 32T50 154Q50 178 61 192T84 210T107 214Q132 214 148 197T164 157Z"></path><path id="MJX-1-TEX-N-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path><path id="MJX-1-TEX-N-33" d="M127 463Q100 463 85 480T69 524Q69 579 117 622T233 665Q268 665 277 664Q351 652 390 611T430 522Q430 470 396 421T302 350L299 348Q299 347 308 345T337 336T375 315Q457 262 457 175Q457 96 395 37T238 -22Q158 -22 100 21T42 130Q42 158 60 175T105 193Q133 193 151 175T169 130Q169 119 166 110T159 94T148 82T136 74T126 70T118 67L114 66Q165 21 238 21Q293 21 321 74Q338 107 338 175V195Q338 290 274 322Q259 328 213 329L171 330L168 332Q166 335 166 348Q166 366 174 366Q202 366 232 371Q266 376 294 413T322 525V533Q322 590 287 612Q265 626 240 626Q208 626 181 615T143 592T132 580H135Q138 579 143 578T153 573T165 566T175 555T183 540T186 520Q186 498 172 481T127 463Z"></path><path id="MJX-1-TEX-N-37" d="M55 458Q56 460 72 567L88 674Q88 676 108 676H128V672Q128 662 143 655T195 646T364 644H485V605L417 512Q408 500 387 472T360 435T339 403T319 367T305 330T292 284T284 230T278 162T275 80Q275 66 275 52T274 28V19Q270 2 255 -10T221 -22Q210 -22 200 -19T179 0T168 40Q168 198 265 368Q285 400 349 489L395 552H302Q128 552 119 546Q113 543 108 522T98 479L95 458V455H55V458Z"></path><path id="MJX-1-TEX-N-36" d="M42 313Q42 476 123 571T303 666Q372 666 402 630T432 550Q432 525 418 510T379 495Q356 495 341 509T326 548Q326 592 373 601Q351 623 311 626Q240 626 194 566Q147 500 147 364L148 360Q153 366 156 373Q197 433 263 433H267Q313 433 348 414Q372 400 396 374T435 317Q456 268 456 210V192Q456 169 451 149Q440 90 387 34T253 -22Q225 -22 199 -14T143 16T92 75T56 172T42 313ZM257 397Q227 397 205 380T171 335T154 278T148 216Q148 133 160 97T198 39Q222 21 251 21Q302 21 329 59Q342 77 347 104T352 209Q352 289 347 316T329 361Q302 397 257 397Z"></path><path id="MJX-1-TEX-N-38" d="M70 417T70 494T124 618T248 666Q319 666 374 624T429 515Q429 485 418 459T392 417T361 389T335 371T324 363L338 354Q352 344 366 334T382 323Q457 264 457 174Q457 95 399 37T249 -22Q159 -22 101 29T43 155Q43 263 172 335L154 348Q133 361 127 368Q70 417 70 494ZM286 386L292 390Q298 394 301 396T311 403T323 413T334 425T345 438T355 454T364 471T369 491T371 513Q371 556 342 586T275 624Q268 625 242 625Q201 625 165 599T128 534Q128 511 141 492T167 463T217 431Q224 426 228 424L286 386ZM250 21Q308 21 350 55T392 137Q392 154 387 169T375 194T353 216T330 234T301 253T274 270Q260 279 244 289T218 306L210 311Q204 311 181 294T133 239T107 157Q107 98 150 60T250 21Z"></path></defs><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="scale(1,-1)"><g data-mml-node="math"><g data-mml-node="msup"><g data-mml-node="mn"><use data-c="32" xlink:href="#MJX-1-TEX-N-32"></use></g><g data-mml-node="TeXAtom" transform="translate(533,413) scale(0.707)" data-mjx-texclass="ORD"><g data-mml-node="mn"><use data-c="31" xlink:href="#MJX-1-TEX-N-31"></use><use data-c="35" xlink:href="#MJX-1-TEX-N-35" transform="translate(500,0)"></use></g></g></g><g data-mml-node="mo" transform="translate(1567.9,0)"><use data-c="3D" xlink:href="#MJX-1-TEX-N-3D"></use></g><g data-mml-node="mn" transform="translate(2623.7,0)"><use data-c="33" xlink:href="#MJX-1-TEX-N-33"></use><use data-c="32" xlink:href="#MJX-1-TEX-N-32" transform="translate(500,0)"></use><use data-c="37" xlink:href="#MJX-1-TEX-N-37" transform="translate(1000,0)"></use><use data-c="36" xlink:href="#MJX-1-TEX-N-36" transform="translate(1500,0)"></use><use data-c="38" xlink:href="#MJX-1-TEX-N-38" transform="translate(2000,0)"></use></g></g></g></svg><mjx-assistive-mml unselectable="on" display="block"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><msup><mn>2</mn><mrow data-mjx-texclass="ORD"><mn>15</mn></mrow></msup><mo>=</mo><mn>32768</mn></math></mjx-assistive-mml></mjx-container></div></div><p><span>ip地址是传感器的ip地址,例如’196.168.1.101’</span></p><p><span>指令号是要对驱动器进行的操作,包括返回轮廓数据、测量值等。目前仅支持返回单测头轮廓数据,格式为Pk,其中k为测头序号。目前仅能使用’P1’指令。</span></p><figure class='table-figure'><table><thead><tr><th><span>变量</span></th><th><span>含义</span></th><th><span>备注</span></th></tr></thead><tbody><tr><td><span>a</span></td><td><span>指令</span></td><td> </td></tr><tr><td><span>'Pk'</span></td><td><span>轮廓输出</span></td><td><span>LJ_G5000_v1_2('192.168.1.101','P1')</span></td></tr><tr><td><del><span>'Ma'</span></del></td><td><span>测量输出</span></td><td><span>LJ_G5000_v1_2('192.168.1.101','M12345678')</span></td></tr><tr><td><del><span>'Q1'</span></del></td><td><span>通讯模式</span></td><td><span>LJ_G5000_v1_2('192.168.1.101','Q1')</span></td></tr><tr><td><del><span>'R0'</span></del></td><td><span>测量模式</span></td><td><span>LJ_G5000_v1_2('192.168.1.101','R0')</span></td></tr><tr><td><span>coordinate</span></td><td><span>轮廓横坐标(X)</span></td><td><span>单位um</span></td></tr><tr><td><span>profile</span></td><td><span>轮廓纵坐标(Z)</span></td><td><span>单位um</span></td></tr></tbody></table></figure></li></ol><p><span>示例:</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="matlab"><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang="matlab"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 9.52344px; left: 8px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">[<span class="cm-variable">coordinate</span>,<span class="cm-variable">profile</span>] = <span class="cm-variable">LJ_G5000_v1_2</span>(<span class="cm-string">'192.168.1.101'</span>,<span class="cm-string">'P1'</span>); <span class="cm-comment">% 获取截面数据</span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-builtin">plot</span>(<span class="cm-variable">coordinate</span>,<span class="cm-variable">profile</span>) <span class="cm-comment">% 绘制截面形状</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 46px;"></div><div class="CodeMirror-gutters" style="display: none; height: 46px;"></div></div></div></pre><p><img src="images/image-20240819165756471.png" referrerpolicy="no-referrer" alt="image-20240819165756471"></p><h3 id='33-使用技巧'><span>3.3 使用技巧</span></h3><p><strong><span>(1)在建立链接时找不到激光位移传感器的IP地址</span></strong></p><p><span> </span><span>①在激光轮廓传感器中设置IP地址,注意,需要避开当前已占用的IP地址;设置完成后重启控制器,以更新配置;如果还未找到IP地址,则进行下一步;</span></p><p><span> </span><span>②打开LJ-Navigator,配置通讯设定并读取控制器设置,完成后在命令行中应该能够通过arp -a 刷新出控制器的IP地址。需要注意的是,使用LJ-Navigator时会占用TCPIP端口,如果需要在MATLAB中使用,则需要先退出该软件。</span></p><h2 id='七程序和代码'><span>七、程序和代码</span></h2><h3 id='1-截面获取'><span>1. 截面获取</span></h3><p><span>Matlab App Installation Package: </span><a href='Docs/LJ_G5000_v1_2.mlappinstall'><span>LJ_G5000_v1_2.mlappinstall</span></a><span> </span></p><p><strong><span>(1)安装</span></strong><span>:双击安装包即可,安装后可以在附加管理器中找到文件目录:</span></p><p><img src="images/image-20240819173222894.png" referrerpolicy="no-referrer" alt="image-20240819173222894"></p><p><strong><span>(2)使用</span></strong><span>:</span></p><p><span> </span><span>LJ_G5000_V1_2在上一节已经说过用法,在这不赘述。</span></p><p><span> </span><span>LJ_G5000_V2_2:在使用这个函数前,需要先自行建立全局(global)tcpip对象t,才能正常使用,调用时不需要再输入IP,直接输入指令即可。</span></p><p><strong><span>(3)说明</span></strong><span>:</span></p><p><span> </span><span>两个函数都是基于LJG5000以太网通讯协议( </span><a href='Docs\01 LJG5000_LAN.pdf'><span>01 LJG5000_LAN.pdf</span></a><span> )文件编写的,LJ_G5000_V1_2的处理基本流程包括:建立TCPIP对象→建立通讯→</span><strong><span>发送指令→接收数据→处理数据</span></strong><span>→断开通讯→清除TCPIP对象,LJ_G5000_V2_2的目的是为了避免多次调用时,频繁建立和断开通讯,造成时间上的浪费,因此只保留了上述加粗部分的环节。</span></p><p><span> </span><span>特别的,如果使用的打印机可以通过串口Serial Port进行通讯,并进行运动控制。就可以以此控制打印机运动→获取截面的循环,从而获得三维轮廓。</span></p><h2 id='八example-how-to-use'><span>八、Example (How to use)</span></h2><h3 id='1打印一个立方体'><span>(1)打印一个立方体</span></h3><h3 id='2获得一个截面轮廓'><span>(2)获得一个截面轮廓</span></h3><h3 id='3按照指定轨迹获取轮廓'><span>(3)按照指定轨迹获取轮廓</span></h3><h3 id='4设计打印轨迹并在打印后扫描然后输出点云文件'><span>(4)设计打印轨迹并在打印后扫描,然后输出点云文件</span></h3><h1 id='参考文献'><span>参考文献</span></h1><p> </p></div></div>
</body>
</html>