File: layer-detect2.gcode

package info (click to toggle)
printrun 2.0.0~rc8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,060 kB
  • sloc: python: 13,447; xml: 62; ansic: 20; makefile: 16; sh: 12
file content (17 lines) | stat: -rw-r--r-- 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; Print this file to see the parsed layers
; This file tests problem reported in
; https://github.com/kliment/Printrun/pull/1069#issuecomment-770091308

G28
G0 Z15
G1 E6 ; should not count as x,y not moved

G0 X10 Y10 Z0.2
G1 X20 E7

G0 Z10
M83 ;relative extrusion mode
G1 E-3 ; retract should not create layer

;@!print([l.z for l in self.fgcode.all_layers])
;@!print('test ', 'passed' if len(self.fgcode.all_layers) == 1 else 'failed')