I have prepared a special gcode file that uses a manual filament change and then moves below the last printed layer. The gcode viewer shows the model exactly as expected. However, there is a layer selection bar on the right, which positions the color shift at a wrong position:
You can clearly see that it shows a color shift at the first transition to Z=1.68, however, the color is not changed until the second transition to that same height, which is shown higher on that scale.
The resulting gcode was produced by combining 2 different project files, both are in the provided archive:
Big side plate (3).zip
The g-code of the "no yellow" file is used to the end of the print (up to M107 command). Before the "end g-code" instructions, a portion of the g-code from the second project is inserted, starting with the "color change", and all the way to it's end g-code. I also inserted several additional move instructions around the first XY movement command of the second project, to avoid any collisions with the already printed part and to place the nozzle at the correct height:
; Move to the correct position, but 1 cm above, THEN drop
G1 Z10 F10800
G1 X48.525 Y97.593 F10800
G1 Z1.68 F10800
(the G1 X... line is kept the way the slicer has written it). Then, this frankenstein g-code file is opened with GCode viewer.
Unfortunately, I couldn't find a way to achieve the same with just one project file (without having to switch colors more than once). It seems to be okay to do this in one color switch, as the nozzle only goes back 3 layers (0.36 mm) and the print head will not be touching the part.
Description of the bug
I have prepared a special gcode file that uses a manual filament change and then moves below the last printed layer. The gcode viewer shows the model exactly as expected. However, there is a layer selection bar on the right, which positions the color shift at a wrong position:
You can clearly see that it shows a color shift at the first transition to Z=1.68, however, the color is not changed until the second transition to that same height, which is shown higher on that scale.
The g-code file is provided here:
Big side plate (3), merged.zip
Project file & How to reproduce
The resulting gcode was produced by combining 2 different project files, both are in the provided archive: Big side plate (3).zip
The g-code of the "no yellow" file is used to the end of the print (up to M107 command). Before the "end g-code" instructions, a portion of the g-code from the second project is inserted, starting with the "color change", and all the way to it's end g-code. I also inserted several additional move instructions around the first XY movement command of the second project, to avoid any collisions with the already printed part and to place the nozzle at the correct height:
(the
G1 X...
line is kept the way the slicer has written it). Then, this frankenstein g-code file is opened with GCode viewer.Unfortunately, I couldn't find a way to achieve the same with just one project file (without having to switch colors more than once). It seems to be okay to do this in one color switch, as the nozzle only goes back 3 layers (0.36 mm) and the print head will not be touching the part.
Checklist of files included above
Version of PrusaSlicer
2.4.2 from ArchLinux repo
Operating system
ArchLinux (updated yesterday)
Printer model
FlyingBear Ghost 5