Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
"Layer change G-code" layer_num placeholder out of order #2634
I'm having some issues with the layer_num placeholder in the custom layer change g-code. When support is enabled, the layer_num outputs are duplicated and out of order. When support is disabled, everything works great. I can work around the duplication but not the incorrect ordering. I confirmed the issue exists on both windows and linux for versions 1.1.7 and 1.2.6
Details are below. Rather than post the entire gcode file, I used grep to filter the file so that only lines containing "before layer" remain. The ordering of the lines is preserved.
Config: Start with defaults, add "; before layer [layer_num]" to Before layer change G-code and enable support material
Filtered output gcode without support (Win7, Slic3r 1.2.6 GUI):
Filtered output gcode with support (Win7, Slic3r 1.2.6):
Just realized this is probably due to Slic3r tracking support material layers separately from regular layers.
Would it be possible to have a 'layer_type' placeholder available in the custom layer change gcode fields as well? It could return 'support' or 'object' depending on what type of layer it is. That would solve my problems.