What is layer high in the slicer? How does it count layers?

Seems like a stupid question (maybe it is) but please wait.
I most often printed using the profie “0.16 mm Optimal @BBL X1C”, because “optimal” sounds much like optimal.
But recently I printed something using 0.20 mm. The result was acceptable but less good and I started to compare different settings after slicing in the slicer (not print). I selected in the preview to show only one layer.
With 0.20 mm there was allways some print at every layer in the modell when I moved the right scroll ruler up or down.
With 0.16mm there where empty layers (or layers empty for the model but they contained printing for the support).
Also with 0.16 there was a total of 286 layers, with 0,20 159 layers. If you multiply this, then the same model would have different high.
I thought: ok, the layers might overlap. So what is the z-position?
So now I examined again (with a different model, but similar behaviour).
With the bottom ruler at the end it shows the z-movment.
E.g. with 0.16mm at the end of layer 108 it moves to 9.52. Layer 109 is totaly empty, no gcode. At the end of layer 110 it moves to 9.68. Ok, difference 0.16, but with some “dummy layer” in between. But also confusing, it states a layer high of 0.04.
See attached screenshots:
layer108
layer110

Might be that is not important, but I find it at least interesting.

Note: I also found that the “layer hight” in gcode varies. I found also 0.008 and 0.12.

I suspect you’re seeing “quantization error”. The number of stepper motor steps and the layer height are not evenly divisible. There’s “rounding error”. So at a guess, to minimize how large the error can get, every once in a while the slicer throws in a “short” layer to “zero out” the error for the next set of layers.

note: I haven’t thought about this too hard, so I could be completely wrong… :slight_smile:

1 Like

@RocketSled Nice idea, but sorry, it’s wrong. I exported the g-code and examined it. The z-position is given in mm, that meens the conversion to steps is done from the firmware.

But I think I have now the explanation. I wondered, why I did not observe this earlier. I had examined often enough the slices. And now I had the idea: I had in this case tunred on support.
I made a simple test. You can reproduce yourself if you like. Just create a new project and add the build in sphere. Slice it without support → 160 Layers. Slice it with support → 168 Layers. (At 0.16 high.) The sphere does not need support, but you can add if you wish. And it will be used only the first few layers.
The support is printed at a layer hight between the normal layers. So the connection to the object is week.

I allways find it valuable to understand how things work. :grinning: