supermerill / SuperSlicer

G-code generator for 3D printers (Prusa, Voron, Creality, etc.)
4.03k stars 516 forks source link

Support for extruded_volume_total macro in custom G-Code #4280

Open TheOpponent opened 1 month ago

TheOpponent commented 1 month ago

Is your feature request related to a problem? Please describe. In PrusaSlicer, I use the macro extruded_volume_total in my tool change G-Code to avoid unnecessary M600 commands from being emitted early in a print, and it is not supported in current SuperSlicer. Even commenting out the line containing it will cause SuperSlicer to throw an error about the unsupported macro.

Describe the solution you'd like Port the macro extruded_volume_total from PrusaSlicer, which describes the amount of filament extruded as of the point in the print where the macro will occur. This includes any skirt or brim.

Describe how it would work See above.

Describe alternatives you've considered As of now, I can only either manually insert or remove the custom G-Code entirely or use PrusaSlicer for those prints that need it.

Additional context This is the custom G-Code I use for tool change in PrusaSlicer:

M104 S[temperature[next_extruder]]
{if extruded_volume_total > 25}M600{endif}

Without the macro, M600 is added at the start of every print, including those that do not include tool changes.

supermerill commented 1 month ago

will be in 2.7