1. About
  2. Features
  3. Explore

I´m currently writing my own firmware for a custom delta printer. Therefore I also need to read G-code from programs like Slic3r. Even with an small example like an cube I´m struggling to find out where the z-coordinate is hidden in the code. Here is a small example of the code.

; 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 

Here some configuration details:
G-code flavor: RepRap
Nozzle diameter: 0,5mm

diameter: 3mm

layer height: 0,4 mm
perimeters: 3
solid layers top:3 bottom :3

Here is the full G-code

1 Answer 1

It isn't hidden at all. It's just that the Z-axis position only changes with each layer change, so the Z coordinate is only passed at layer change. On line 17 of your example G-code, it starts the first layer at Z=0.5mm:

G1 Z0.500 F7800.000 

The next time you should expect Z to appear is on the next layer.