Notifications
Clear all

Differing Number of Layers  

  RSS
ScottW
(@scottw)
Reputable Member
Differing Number of Layers

I have two small models, both exactly 1.50mm thick.  They both show as 1.50mm thick (Z) in PrusaSlicer.  But when sliced at 0.20 layer thickness, one is 7 layers (1.4mm) and the other is 8 layers (1.6mm). 

I understand they can't hit 1.5 exactly using 0.20 layers, so I expected them to both be 7 layers (1.4mm), or both be 8 layers (1.6mm).  Why is PrusaSlicer creating a different number of layers for these two parts?

Here's the 3MF file (zipped): Layer_Problem_Example_3mf

More details, in case they are relevant: 

  • These parts are components of this printables model.  Several other parts in the model have the same issue. 
  • When initially imported, PrusaSlicer displays "Auto-repaired 130 edges" on each STL and slicing at 0.20mm successfully results in both being 8 layers (1.6mm) thick.   
  • After clicking on the "Auto-repaired" icon for each, the "Fixing by Windows Repair Algorithm" is displayed, and then the "Auto-repaired" errors are gone.  The models are still both 1.5mm thick according to PrusaSlicer, and exporting the "fixed" STLs and importing to FCAD, it also shows them as 1.50mm thick.  But after the "Windows Repair", one model slices as 7 layers (1.4mm) and the other slices as 8 layers (1.6mm).  What's going on here?

 

Opublikowany : 12/11/2025 10:13 pm
ruggbg
(@ruggbg)
Member
RE:

try this- change the layer height to 0.25. If that works, it is related to the problem I have that I rcvd no responses on. I have no idea why changing to 0.25 should have affected my model slice, but it did. I found nothing in the model that was not perfect, but the problem might be a VERY slight tilt that I can't see. If the change works, in your case, it is causing Prusa to make different decisions at borderline measurements. Let me know what you find.

This post was modified 4 weeks temu by ruggbg
Opublikowany : 13/11/2025 12:24 am
vhubbard
(@vhubbard)
Reputable Member
RE: Differing Number of Layers

Numerical round off. Depends on how it is set in the software and firmware. Also the Z axis servo increment is .02mm On the MK3/4 and CoreOne. Any layer height that does not divide into it equally will be off +- .01 each layer. Example .25 layer height could be .24 one layer and .26 the next as the machine tries to hit the .25 in the program but can not exactly hit the increment. Prusaslicer does not account for the machine resolution, no setting for XY or Z minimum increment in the machine definition.
If you want something near perfect in Z you must have it evenly divisible by layer height AND the Z axis minimum move.

XY on the MK3 is .16mm minimum but on the MK4and Core One it is .08mm. Same problem when trying to get XY "perfect". Depends on where the starting edge starts on the servo increment and the opposing edge ends... That is part of the published tolerance limits. Sometimes you may get very close to actual, other times up to 1/2 the minimal XY increment away. Plus nozzle flow variation in width.

For most projects this is so small it doesn't matter. But as time goes on and desires for precision grow, closed loop linear rails for XY at least may become more inviting.

Opublikowany : 13/11/2025 2:01 am
2 ludzie polubili
ScottW
(@scottw)
Reputable Member
Topic starter answered:
RE: Differing Number of Layers

I'm not talking about small differences in the part size after printing.  I am talking about an entire 0.20 layer missing on a 1.5mm tall part.  And both parts are exactly the same designed size (1.50mm), but the SLICER slices one as 7 layers (1.40mm) and the other as 8 layers (1.60mm).  Nothing to do with motor steps.  And if it was rounding in PrusaSlicer, why would it round down on one 1.5mm part, and round up on the other 1.5mm part?

Did you look at the 3MF?

Posted by: @vhubbard

Numerical round off. Depends on how it is set in the software and firmware. Also the Z axis servo increment is .02mm On the MK3/4 and CoreOne. Any layer height that does not divide into it equally will be off +- .01 each layer. Example .25 layer height could be .24 one layer and .26 the next as the machine tries to hit the .25 in the program but can not exactly hit the increment. Prusaslicer does not account for the machine resolution, no setting for XY or Z minimum increment in the machine definition.
If you want something near perfect in Z you must have it evenly divisible by layer height AND the Z axis minimum move.

XY on the MK3 is .16mm minimum but on the MK4and Core One it is .08mm. Same problem when trying to get XY "perfect". Depends on where the starting edge starts on the servo increment and the opposing edge ends... That is part of the published tolerance limits. Sometimes you may get very close to actual, other times up to 1/2 the minimal XY increment away. Plus nozzle flow variation in width.

For most projects this is so small it doesn't matter. But as time goes on and desires for precision grow, closed loop linear rails for XY at least may become more inviting.

 

Opublikowany : 13/11/2025 3:01 am
ScottW
(@scottw)
Reputable Member
Topic starter answered:
RE:

Yes, at 0.25mm layers (except first layer 0.20mm), both parts get sliced as 8 layers and end at 1.45mm Z.   Same with 0.15mm layers (except first layer at .20mm), both parts get sliced as 10 layers and end at 1.55mm.

But with 0.20mm layers, one part gets sliced as 7 layers (1.4mm tall) and the other 8 layers (1.6mm tall).  Both STLs are exactly 1.50mm tall.  

In all cases, I am using the default Prusa "structural" profiles.

Posted by: @ruggbg

try this- change the layer height to 0.25. If that works, it is related to the problem I have that I rcvd no responses on. I have no idea why changing to 0.25 should have affected my model slice, but it did. I found nothing in the model that was not perfect, but the problem might be a VERY slight tilt that I can't see. If the change works, in your case, it is causing Prusa to make different decisions at borderline measurements. Let me know what you find.

 

Opublikowany : 13/11/2025 3:06 am
Neophyl
(@neophyl)
Illustrious Member
RE: Differing Number of Layers

Scott the underlying issue is that the slicers GUI treats round/displaying of numbers with decimal places differently to the code that does the actual slicing. 

The parts in your 3mf which I presume are after the repair as there are no errors shown in the tree list when I open your project file are NOT the same height anymore.  Regardless of what the GUI is displaying.

If you export them again from PS and then load them into any software that does show the full numbers (such as Blender or 3D-Tool) you can see that.  Object 8_f is 1.498mm in Z when looked at in 3d-tool, while object 8_m is 1.5mm in Z.  

This of course results in the slice difference as the 1.498 is being rounded down to 7 layers ie 1.4mm and the 1.5 is being rounded up to 8 layers.  All it takes is being even the tiniest bit of being off the boundary, in this case 1.5mm

The repair will probably have merged some vertices.  In which case the final location of the merged vert will generally be the average of the vertices that were merged.  Or in blender terms merge at centre.  Its trivial with such simple parts as you included to make them accurate again with something like Blender. 

Of course it would be better if the original creator of the models actually released proper unbroken geometry that PS didn't have to fix in the first place.

Opublikowany : 13/11/2025 7:19 am
4 ludzie polubili
ruggbg
(@ruggbg)
Member
RE: Differing Number of Layers

BTW, it did the same thing with Slic3r and Cura

Posted by: @scottw

Yes, at 0.25mm layers (except first layer 0.20mm), both parts get sliced as 8 layers and end at 1.45mm Z.   Same with 0.15mm layers (except first layer at .20mm), both parts get sliced as 10 layers and end at 1.55mm.

But with 0.20mm layers, one part gets sliced as 7 layers (1.4mm tall) and the other 8 layers (1.6mm tall).  Both STLs are exactly 1.50mm tall.  

In all cases, I am using the default Prusa "structural" profiles.

Posted by: @ruggbg

try this- change the layer height to 0.25. If that works, it is related to the problem I have that I rcvd no responses on. I have no idea why changing to 0.25 should have affected my model slice, but it did. I found nothing in the model that was not perfect, but the problem might be a VERY slight tilt that I can't see. If the change works, in your case, it is causing Prusa to make different decisions at borderline measurements. Let me know what you find.

 

 

Opublikowany : 13/11/2025 12:09 pm
ScottW
(@scottw)
Reputable Member
Topic starter answered:
RE:

@neophyl - Thank you for the comprehensive answer!  I was laboring under the assumption that both parts were still Z=1.50mm, and that's why I was confused by the slicer treating one differently than the other.  I *thought* I had eliminated that possibility, because I had imported the repaired model into FCAD and measured them as still being 1.50mm there -- but it turns out that I had FCAD set to 2-decimal precision as well.  (Doh!)

So, as you explained, the "Fix by Windows algorithm" repair resulted in one model being <1.50mm tall, and that explains the slicer going to 1.4mm for the top layer on that model.

I really appreciate you taking the time to analyze and explain.  Thank you!

 

Posted by: @neophyl

Scott the underlying issue is that the slicers GUI treats round/displaying of numbers with decimal places differently to the code that does the actual slicing. 

The parts in your 3mf which I presume are after the repair as there are no errors shown in the tree list when I open your project file are NOT the same height anymore.  Regardless of what the GUI is displaying.

If you export them again from PS and then load them into any software that does show the full numbers (such as Blender or 3D-Tool) you can see that.  Object 8_f is 1.498mm in Z when looked at in 3d-tool, while object 8_m is 1.5mm in Z.  

This of course results in the slice difference as the 1.498 is being rounded down to 7 layers ie 1.4mm and the 1.5 is being rounded up to 8 layers.  All it takes is being even the tiniest bit of being off the boundary, in this case 1.5mm

The repair will probably have merged some vertices.  In which case the final location of the merged vert will generally be the average of the vertices that were merged.  Or in blender terms merge at centre.  Its trivial with such simple parts as you included to make them accurate again with something like Blender. 

Of course it would be better if the original creator of the models actually released proper unbroken geometry that PS didn't have to fix in the first place.

 

Opublikowany : 13/11/2025 3:50 pm
2 ludzie polubili
Sembazuru
(@sembazuru)
Noble Member
RE: Differing Number of Layers

Now that your original issue is sorted, two ways to correct for the desired height being off of the printed layer height are:

  1. Adjust the first layer height by the amount it is off. So for your desired 1.5mm height with a 0.2mm layer height you may want to try making the first layer 0.3mm high. I do recall the MK3 series having a firmware limit of the first layer minimum 0.15mm layer height so requesting a 0.1mm first layer height would get underextrusion on the first layer as the slicer is asking for plastic extrusion for 0.1mm layer height as the printer maintains 0.15mm above the print surface. I don't know if the MK4S (as your 3mf indicates you are printing for) also has the hard firmware first layer hight minimum height.
  2. Use the adaptive variable layer height to let PrusaSlicer adjust the layers to get your actual desired height. (This is more useful on models that have several top surfaces at different heights that may not match the base layer height in the printing profile.)

See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs

Opublikowany : 18/11/2025 12:20 am
Share: