我目前正在为自定义 delta 打印机编写自己的固件。因此,我还需要从 Slic3r 之类的程序中读取 G 代码。即使是像立方体这样的小例子,我也很难找出 z 坐标隐藏在代码中的位置。这是代码的一个小例子。
; generated by Slic3r 1.2.9 on 2017-02-13 at 15:08:01
; external perimeters extrusion width = 0.50mm
; perimeters extrusion width = 0.58mm
; infill extrusion width = 0.58mm
; solid infill extrusion width = 0.58mm
; top infill extrusion width = 0.58mm
M107
M104 S205 ; set temperature
G28 ; home all axes
G1 Z5 F5000 ; lift nozzle
M109 S205 ; wait for temperature to be reached
G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
G92 E0
G1 Z0.500 F7800.000
G1 E-2.00000 F2400.00000
G92 E0
G1 X-31.893 Y0.000 F7800.000
G1 E2.00000 F2400.00000
G1 X-31.893 Y-25.001 E3.57871 F1800.000
G1 X-31.496 Y-27.307 E3.72646
G1 X-30.350 Y-29.347 E3.87420
G1 X-28.588 Y-30.886 E4.02194
G1 X-26.413 Y-31.748 E4.16968
G1 X-25.000 Y-31.894 E4.25936
G1 X25.000 Y-31.894 E7.41663
G1 X27.306 Y-31.497 E7.56437
G1 X29.346 Y-30.351 E7.71211 F1800.000
G1 X30.885 Y-28.589 E7.85985
G1 X31.746 Y-26.414 E8.00759
G1 X31.893 Y-25.001 E8.09727
G1 X31.893 Y25.001 E11.25470
G1 X31.496 Y27.307 E11.40244
G1 X30.350 Y29.347 E11.55019
G1 X28.588 Y30.886 E11.69793
G1 X26.413 Y31.748 E11.84567
G1 X25.000 Y31.894 E11.93535
G1 X-25.000 Y31.894 E15.09262
G1 X-27.306 Y31.497 E15.24036
G1 X-29.346 Y30.351 E15.38810
G1 X-30.885 Y28.589 E15.53584
G1 X-31.746 Y26.414 E15.68358
G1 X-31.893 Y25.001 E15.77326
G1 X-31.893 Y0.075 E17.34724
G1 E15.34724 F2400.00000
G92 E0
G1 X-22.715 Y-22.716 F7800.000
G1 E2.00000 F2400.00000
G1 X22.715 Y-22.716 E4.86865 F1800.000
G1 X22.715 Y22.716 E7.73745
G1 X-22.715 Y22.716 E10.60609
G1 X-22.715 Y-22.641 E13.47016
G1 X-23.607 Y-23.609 F7800.000
G1 X23.607 Y-23.609 E16.45155 F1800.000
G1 X23.607 Y23.608 E19.43309
G1 X-23.607 Y23.608 E22.41447
G1 X-23.607 Y-23.534 E25.39128
G1 X-24.500 Y-24.501 F7800.000
G1 X24.500 Y-24.501 E28.48541 F1800.000
G1 X24.500 Y24.501 E31.57969
G1 X-24.500 Y24.501 E34.67382
G1 X-24.500 Y-24.426 E37.76336
这里有一些配置细节:
G-code 味道:RepRap
喷嘴直径:0,5mm
灯丝
直径:3mm
一般:
层高:0.4 mm
周长:3
实心层 顶部:3 底部:3
这是完整的 G 代码