Orca pipeline
12 results today 24 agents on 1 worker Admin

Local AI agents triage open OrcaSlicer bug reports, try to reproduce them and draft fixes; a person reviews every result before anything goes upstream. An independent experiment, read only.

Queue / #9014

#9014New

Parameter "AFTER_LAYER_CHANGE" application errors

Agent answer

No agent has taken this issue yet.

Issue text on GitHub

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

OrcaSlicer Version

2.3.0 Official Release

Operating System (OS)

Windows

OS Version

Windows 10 x64

Additional system information

No response

Printer

RepRapFirmware (mainboard Duet 3 6HC)

How to reproduce

  1. For clarity, set the printer settings on the "Machine G-Gode" tab in the "BEFORE_LAYER_CHANGE" and "AFTER_LAYER_CHANGE" parameters given here in text form and shown in the screenshot:
    ;BEFORE_LAYER_CHANGE
    ;Curr_Layer_bef_[layer_num]
    ;Curr_Height_bef_[layer_z]
    G92 E0

;AFTER_LAYER_CHANGE
;Curr_Layer_aft_[layer_num]
;Curr_Height_aft_[layer_z]

  1. Slice any detail
  2. See the text of the layer change in the resulting G-Code

Actual results

Image

  1. The code specified in the "layer_change_gcode" parameter should be applied "AFTER The Z-Lift", but is applied BEFORE the nozzle height is changed;
  2. The value of "[layer_num]" AFTER changing the layer may not remain the same as it was BEFORE changing the layer. This is a significant error, since users can link the post-processing processes of the finished G-Code to the value of "layer number".
  3. The value of "[layer_z]" must correspond to the current height. If the parameter "layer_change_gcode" is used incorrectly (described in p.1), it cannot be said that an error is present, but after fixing the problem, the correctness of the value should be checked.

It seems that the problem described in point 1 is associated with the presence of another error, see Fig. 2:

Image
4. The first layer of the part on the table = Layer 1, this is correct. But in the prepared G-Code, printing starts on layer "0". This is incorrect, because the layer numbering in the G-Code must correspond to the layer numbering in the cutting - this is critical to the process of inserting G-Code in the cutting interface ("Template custom G-Code", etc.), as well as for using post-processing scripts of the prepared G-Code.
If in the slicer GUI the part starts with layer number 1, then in the G-Code there should be no extrusion of the part on layer number 0.

Expected results

  1. The code specified in the "layer_change_gcode" parameter is actually applied AFTER changing the nozzle height;
  2. If in the slicer GUI the part starts with layer number 1, then in the G-code the extrusion starts with [layer_num]=1
  3. The "[layer_num]" value shown specified in the "BEFORE_LAYER_CHANGE" section is incremented until the first output in the "AFTER_LAYER_CHANGE" section.

Project file & Debug log uploads

Project.zip

Checklist of files to include

  • [ ] Log file
  • [*] Project file

Anything else?

No response

Author
EagleB3
Comments
7
Created
2025-03-22
bug

Log

  1. Collected from GitHub
    panel · 3 h ago