OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Limit variable layer height calculation and displaying precision to t…

Open vovodroid opened this issue 1 year ago • 8 comments

Currently in variable layer height slider heights are shown with six digits precision:

image

It has no meaning as Z height is rounded to three digits anyway (and to two digits in slider):

image

This PR rounds variable height calculation and displaying to three digits:

image

vovodroid avatar Jun 21 '24 16:06 vovodroid

Personally, as you've already opened the code for this, I would think that rounding the variable layer height to 2 decimals may be preferred as most printers cannot output a 3 digit precision on the z (or any other axis for that matter) in a meaningful way.

For example a Voron 2.4 per full step of the z axis outputs 0.04mm in Z movement per full step, and, assuming a fully precise 16 micro steps, it would output 0.0025mm per micro step. So a 0.001 move is not possible with the standard voron setup for example.

Using 64 micro steps a voron may be able to output a resolution of 0.000625 per micro step so a layer height change of 0.001mm would be 1.6 micro steps to execute which is not really attainable due to micro step drift.

So I'd recommend a 0.01 precision which is achievable with 4 micro steps on the standard config which can be theoretically output with some level of accuracy.

igiannakas avatar Jun 22 '24 07:06 igiannakas

I use three digits to make it consistent with Prusa (https://github.com/prusa3d/PrusaSlicer/pull/10298). They took my implementation and limited it to three digits. I have nothing against 0.01.

vovodroid avatar Jun 22 '24 08:06 vovodroid

Yeap agreed - but I don’t think prusas is right either. The mechanical accuracy of our printers can’t reproduce 3 digits with any meaningful precision. Maybe @SoftFever could chime in here too as I may be wrong :)

igiannakas avatar Jun 22 '24 08:06 igiannakas

You are right, but for whatever reason g-code resolution is also rounded to 0.001, despite standard XY step is 0.0125

vovodroid avatar Jun 22 '24 09:06 vovodroid

I thought that XY is quantized by the slicing tolerance value, so if you set 0.0125 there it would create quanta with this irrespective of decimal places 🤔

igiannakas avatar Jun 22 '24 09:06 igiannakas

Personally, as you've already opened the code for this, I would think that rounding the variable layer height to 2 decimals may be preferred as most printers cannot output a 3 digit precision on the z (or any other axis for that matter) in a meaningful way.

For example a Voron 2.4 per full step of the z axis outputs 0.04mm in Z movement per full step, and, assuming a fully precise 16 micro steps, it would output 0.0025mm per micro step. So a 0.001 move is not possible with the standard voron setup for example.

Using 64 micro steps a voron may be able to output a resolution of 0.000625 per micro step so a layer height change of 0.001mm would be 1.6 micro steps to execute which is not really attainable due to micro step drift.

So I'd recommend a 0.01 precision which is achievable with 4 micro steps on the standard config which can be theoretically output with some level of accuracy.

Even better, I would specify the rounding precision as general printer setting: I have a printer which uses T8 rods and 16 microsteps, so 8000/200/16=2.5 microns.

Sending Z heights with any other quantization will cause a difference between expected and actual layer height, therefore difference in flow rate and Z-related artefacts.

dewi-ny-je avatar Jul 22 '24 13:07 dewi-ny-je

@dewi-ny-je gcode command rounded to 0.001 anyway.

vovodroid avatar Jul 22 '24 13:07 vovodroid

@dewi-ny-je gcode command rounded to 0.001 anyway.

It is also true that with a minimum height of 80 um, a quantization of 2.5 vs commands rounded to 1 results in at most 1.5/80 = ~2% error, hardly noticeable.

dewi-ny-je avatar Jul 22 '24 13:07 dewi-ny-je

According to Chep's test "magic" Z step has no much meaning, unless you use microscope

https://www.youtube.com/watch?v=WIkT8asT90A

vovodroid avatar Jul 29 '24 11:07 vovodroid

I would be shocked if it has any impact on any Creality v-wheel printer ;)

SoftFever avatar Jul 29 '24 11:07 SoftFever