FormerLurker / Octolapse

Stabilized timelapses for Octoprint
GNU Affero General Public License v3.0
638 stars 99 forks source link

Cura plugin for automatic Octolapse support? #829

Open m-roberts opened 2 years ago

m-roberts commented 2 years ago

Discussed in https://github.com/FormerLurker/Octolapse/discussions/828

Originally posted by **m-roberts** March 3, 2022 Rather than having to [inject printer settings manually](https://github.com/FormerLurker/Octolapse/wiki/V0.4---Automatic-Slicer-Configuration#if-you-are-using-cura-follow-these-steps), which are overwritten when Cura projects (`.3mf`) are loaded, it would be a much better user experience if there was simply an option to "install and forget" with a plugin. I am proposing a plugin that injects the fields needed for Octolapse (although I don't see any reason that this couldn't be broadened to include all of the available replacement options) into gcode independently of any gcode configured in the UI (including where the code is currently placed). I have made a start [here](https://github.com/m-roberts/Cura-OctolapseAutoConfigurePlugin), but do not currently have a good way to populate the fields as needed. Cura plugin development is a headache! I have taken some code from [`CuraEngineBackend`'s `StartSliceJob.py`](https://github.com/Ultimaker/Cura/blob/master/plugins/CuraEngineBackend/StartSliceJob.py), but I suspect there is a better way. I would love for someone to offer some guidance - how can I populate these values? Or is there a way to insert the template gcode so that the plugin does not need to duplicate the functionality of replacing the `{placeholders}` with correct values? ### Recommended reading: * https://github.com/tjjfvi/CuraSettingsInjector * http://files.fieldofview.com/cura/Replacement_Patterns.html * https://github.com/Ultimaker/Cura/tree/master/docs
FormerLurker commented 2 years ago

So sorry it's taken me so long to get to your post, but I think it's a great idea! You should hop on the OctoPrint discord and ask around for people who are familiar with cura plugin development. The user FieldOfView is extremely knowledgeable here. If you ask nicely, you will probably get a very good reception! Please let me know how it goes, and I'll help if possible. I'm finally able to get back to my open source projects after an unavoidable hiatus, and things like this are exciting to me :)