"Printed" versus "visited" layer count

Hi,
I am trying to understand how the "visited" layers count number is calculated under "Model Info" section of "GCode Viewer" tab. I searched documentation and these forums, but was not able to find the description.

I usually upload gcode files (I don't use Cura plugin) and I see that "printed" value shows the actual number of layers that will be printed while "visited" layer number is always slightly higher. Here is an example:
Layer count: 33 printed, 37 visited

Just to make it clear - this is not causing any troubles; I am asking only because I am curious.

Thanks.
Best regards,
Boris

1 Like

printed = z-heights on which extrusion happened
visited = any z-heights the print head was directed to go to

Thanks Gina! Naming-wise it makes perfect sense, but I cannot understand how Visited value is calculated.

I am attaching a sample gcode file (the smallest I have). It shows 3 printed layers and 7 visited. My understanding is that the value should be calculated based on the commands in gcode that contain Z. Attached file has 9 appearances of Z, 2 of which are comments. Here is the entire list of the commands with Z:

G1 Z5 F300
G1 Z0 F300
G1 F1000 Z5
End of startup code
G0 F2880 X97.155 Y91.181 Z0.300 # Layer 0
G0 F2880 X114.125 Y104.691 Z0.500 # Layer 1
G0 F2880 X114.125 Y104.689 Z0.700 # Layer 2
G0 F2880 X113.932 Y123.584 Z5.700 # End of print

The 1st layer height is 0.3mm. Other two layers 0.2mm. If we take 0.3 as layer height and 5.7 as the highest point, Visited value should be 5.7 / 0.3 = 19. How are we getting 7 ?

Thanks.

SIM_adapter.gcode (23.7 KB)

It's not layer height, it's Z positions that are used here:

  • Z5 (no extrusion)
  • Z0 (no extrusion)
  • Z5 (no extrusion, shouldn't be counted again, apparently is, bug)
  • Z0.300 (extrusion)
  • Z0.500 (extrusion)
  • Z0.700 (extrusion)
  • Z5.700 (no extrusion)

Seems to get confused by the 5-0-5 switch up there though which makes it count Z5 twice. This aside, we have 3 z-heights on which extrusion happens ("printed") and 6 (7 due to the aforementioned hiccup) which are visited (print head is moved there, irrelevant whether extrusion happens or not). Hence 3 printed, 7 visited.

The GCODE viewer doesn't know your layer height. It can guess it (and it does), but it's irrelevant for the actual layers that are visited. Those are expressed in the Z coordinates actually contained in the GCODE and are the distinct values there (well, it tries to ignore z-hops).

I think the use of the word "layer" leads to misunderstandings in the place when thinking of layer in the sense of the layer view in a slicer ...

I think I got it now. Visited shows the number of lines in gcode that contain Z. Comments with Z are not counted. I checked several other gcode files and tried to predict Visited number based on above assumption. Got it right every single time.
I agree with BerndJM - the label is misleading. I'd either move this value to a separate line, which could be called Stats (or Moves) and show total numbers of X, Y and Z moves, or would get rid of it completely.

Thank to you both! I will mark this topic as resolved.

I've simply removed that now since that kind of information apparently creates more confusion than it's helpful :wink:

Hi Gina,
I just watched your latest video blog where you mentioned this issue and saw couple of posts here complaining that the line is gone. I agree, removing entire line is probably not a good idea. It'd be nice to see the total number of layers (whatever was called "Printed"). I think you could remove "visited" portion of the string. In my opinion it does not add any value. Also, I'd change the label from "Printed" to "Total" or to "To be printed".

Thanks
Best regards,
Boris

Hi, could I just add my voice to those asking for the total layer count being returned to the gcode viewer page please.
I never understood the 'visited' value or used it but I did find the total layer count extremely useful just so you could see how many layers were left to print. Even if the layer info section just reported:

'Layer number: 10 of 150'

Thanks
Russell

1 Like

I would also love to see at last the total printed layers brought back, I valued being able to see this info vs the current layer being printed.

I discovered even better existing solution. Plugin DisplayLayerProgress displays the current processing layer and the percentage on printer LCD and in top Navigation Bar. Here is the link: DisplayLayerProgress

The only issue I had with this plugin - I tried to hide "printer display on Desktop" box by deselecting corresponding checkbox in plugin settings, but it still did not go away. The only way to get rid of it is setting it's width to 0%.

Bug "printer display on Desktop" is now fixed. Please try Version 1.8.1.
Sorry, for the long delay!
BR
Olli

Thanks, Olli !!

I upgraded plugin, reset plugin configuration and switched off the "printer display on Desktop" option. The box did not go away until I restarted Octoprint. Not sure if this is "by-design" or not. The same happened when I tried to revert this setting.
From user's perspective the preferred behavior would be to switch all options on and off "on-the-fly". If this is not possible by some reason, would be nice to have notification message asking to restart Octoprint to activate the changes.

Thanks.
Best regards,
Boris

Restart of Octoprint shouldn't be necessary.
Only a manuell reload of the web-page via Strg + F5 after saving the settings.

I will take a look if it's possbile to do this via Plugin..or maybe I will add a popup-notification (I think other plugins do the same)

BR
Olli

@OllisGit: That's good to know. Thanks!