Open quantumfrost opened 1 year ago
I appreciate the suggestion and apologies for the delayed response but I've been toying around with similar ideas for the next version. It is doable to call existing custom macros with settings and parameters like this but the challenge is implementing when to execute them and supporting more than one macro. I may start with options for a single macro but here's what I'm thinking to really make the plugin useful so you can let me know if you have any thoughts...
The most practical solution would likely be to just add custom macro options to the extensions menu or through post-processing scripts but I'd like to keep the plugin contained under the printer settings category so it's simple to save profiles and job settings.
I could do it similar to how I did the tuning tower presets where 'presets' for a few commonly used calls and all their options can be saved to a drop-down and quickly toggled. This keeps it simple to navigate but only one macro in the list would be executed. Otherwise there would likely need to be separate printer settings/sub-settings for each one.
Each macro could have 2-3 possible settings/parameters and toggles to run at the beginning and/or end of the print. Ideally they could execute on specific layers or line types as this would make the most of the plugin's design but I'm already pushing how Cura's printer settings are meant to be used so this would come with additional challenges😅
I don't know whether this is even possible with the Cura plugin system, but it would be great to be able to add custom settings which would translate to gcode macro calls. You would have to specify a setting name, input parameter type, and the gcode template it translates to.
An example use case could be whether to enable KAMP (adaptive meshing) or use a pre-existing mesh profile. Or control LEDs, etc.
Alternatively, you could have a SET_GCODE_VARIABLE setting, which would take variable name, macro name, and value. You could then check for the values in your PRINT_START to call the functions you need and effectively achieve the same thing.