From the live stream of the printer, I see that the extruder is moving differently from what the virtual extruder is moving in the Preview of OrcaSlicer. For example, the extruder is drawing a curve in real life but when I moved to the same layer in the Preview of OrcaSlicer, this motion is not in that particular layer. Rather, it happens two layers below or one layer above that particular layer. Another strange thing is that OrcaSlicer indicates that there are 188 layers but Klipper shows that there are 189 layers. How come? In OrcaSlicer, the lowest layer is layer 1.
ok. Per default Klipper doesn’t know any layer numbers. It just know the current position (in mm) and the byte position in the gcode. Layers itself, only exists in the Slicer. So Mainsail can just calculate a layer number with the metadata from a gcode file (first layer height and other layer height). if you use variable layer height, this function cannot work very well anymore. So thats we added the gcode SET_PRINT_STATS_INFO to write Slicer data into the gcode to be able to display these (these are only information values). So pls look at the link from @Sineos and try to add these gcodes into your Slicer. This will give you better layer numbers while printing.