Factor most of the magic-numbers out of PRIME_LINE #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows customization of the line's origin, direction and length. Compared to the status quo, this should be a big help for the macro-customizing type of person in case they like to mindlessly fill the slicer plate with models without regard for the ~8mm of margin that the default hardcoded origin (5,10) requires. (Losing that space is honestly a bit of a bummer on the small plate of the Minion, especially coming from the Prusa world where the bed and flexplate have a few unadvertised extra millimeters in the negative-Y domain where the prime line can go without ever disturbing the printed objects.)
Additionally, this PR makes the line's E-values calculated entirely from simple physical facts, including the nozzle bore which can be passed in as a parameter if it's not 0.4mm, and the filament bore which is assumed to be 1.75 (because Jinja2 does not import the math library so instead I precomputed and hardcoded the filament's cross-sectional diameter).
Lastly, this includes a solution for an annoying problem where the nozzle consistently goes a bit cold during the prime line, causing SuperSlicer's insistently-inserted M109 to not immediately pass, causing a long pause after the prime line which defeats the purpose of the prime line by allowing the nozzle to deplete itself via oozing.
I've tested this on my V-Minion and its 0.4mm nozzle quite a bit, and it seems to produce similar results as the status quo.
This should work well with, but is otherwise independent of, my previous PR #54.