Arksine / moonraker

Web API Server for Klipper
https://moonraker.readthedocs.io
GNU General Public License v3.0
1.09k stars 417 forks source link

[FR] get layer count from mainsail #677

Open jamincollins opened 1 year ago

jamincollins commented 1 year ago

Is your feature request related to a problem? Please describe

The docs indicate that I need to modify my slicer to inject gcode that sets variables for the number of layers and progress on layer change.

Describe the solution you'd like

The mainsail UI seems to have an accurate layer count and progress of the print. So, it would appear that mainsail already has this information with no slicer changes needed.

Describe alternatives you've considered

Modifying my slicer as instructed, but this means that any time I change slicers I need to make the same changes. With the way slicer features emerge, each slicer is better at different things. So, it is sometimes necessary to use multiple slicers.

Additional information

No response

meteyou commented 1 year ago

@jamincollins Mainsail only has a calculated layer count as a fallback if you don't insert the G-Codes in the slicer. But this is more an estimate layer count and it doesn't handle adaptive layer height at all.

So i would recommend everyone who wants to know the exact number of layers to use the G-Code method.