Closed IIAIronWolf closed 4 years ago
I don't think there's much I can do within my plugin to help with this. I believe it would need to be dealt with in the other plugins.
I would suggest reporting this as an issue to the cost estimation and filament manager plugin(s) you are using. I'm not familiar with how they calculate their estimations, but, in theory, they should be able to inspect the final set of gcode commands sent to the printer, as opposed to inspecting the commands before being processed by the exclude region plugin (or any other plugin that manipulates the gcode).
The exclude region plugin works by inspecting and potentially altering the gcode commands in what OctoPrint refers to as the 'queuing' phase. To accurately monitor the filament usage, only the final gcode commands sent to the printer would be relevant. OctoPrint has a 'sent' phase that would be a reasonable place to capture those commands for usage estimation. Using that phase would ensure those tools only see the commands after manipulation by any other plugin, including the exclude region plugin.
I just had to cancel 4 out of 5 parts on a print and noticed that my cost estimation is still including the Cost Estimation and Filament Manager tools. This makes it seem as though I am using up more of my Filament Spool then I actually am. Is there a way to tie to the two together?