Closed LinFor closed 5 years ago
Wow, nice work. It will take a while to grok it all. Here are some off-the-cuff remarks:
There's a lot of code duplication. I feel it would be nicer and more readable eg to have a single dict that has all the settings and traverse over that to add the settings, than to have a dict for each setting and duplicate the code for adding each setting individually.
Users of the current version of the plugin will have to change their profiles manually. That is something I would like to prevent.
There's a lot of code duplication. I feel it would be nicer and more readable eg to have a single dict that has all the settings and traverse over that to add the settings, than to have a dict for each setting and duplicate the code for adding each setting individually.
Yeah i thought about it. But I hope that the Cura team will offer some adequate solution for adding the plugin its settings. I can, of course, write my own code by parsing the definition, but it still should be platform code. Ok, I'll try to refactor this.
Users of the current version of the plugin will have to change their profiles manually. That is something I would like to prevent.
As an option, leave the existing setting disabled, and in the new parameters refer to it through the value/resolve as a default. But in this case there will be no way to clear it through the user interface. Or move away from the structure of acceleration settings, but then uniformity will be violated.
I'll rewrite it so the settings dict is loaded from an external .def.json file. I'll also fix the upgrade problem.
I have merged your work into the master branch, and reworked it a little: https://github.com/fieldOfView/Cura-LinearAdvanceSettingPlugin/compare/master
What is now in the master branch will be merged back into the 3.5 branch and be published to the Marketplace as a new version when the Marketplace accepts plugins that are compatible with Cura 4.4
I made different k-factor settings for different line type, to control linear advance with the same granularity as acceleration. This is used to reduce print time - for example we are disabling LA completely for infills and reducing it on inner-walls and supports. Structure of settings made similar to structure of acceleration settings, with limitation of line types I can detect from G-code.