diff options
author | c.lamboo <casperlamboo@gmail.com> | 2022-10-31 13:09:28 +0300 |
---|---|---|
committer | c.lamboo <casperlamboo@gmail.com> | 2022-10-31 13:09:28 +0300 |
commit | c5b3edf925b3a54da558ba79a3d78b750fbed60c (patch) | |
tree | c04d206feade4c732409fe3edbfd63366a2ba66f | |
parent | 1571f4235fb40e12839afd02fb0571a1e10e132a (diff) |
Improve less-random placement of seam location
Only update score if it is improved more than $\epsilon$. As the start index is now predetermined by picking the vertex closest to some target location we favour this starting point. This starting point is now favored over any other candidate with a very similar score. This resolves the issue where the seam was spread more or less randomly over circular shapes when seam-preference was set to sharpest corner.
CURA-9486
-rw-r--r-- | include/PathOrderOptimizer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 8ed9e1ab7..728cca52d 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -489,7 +489,8 @@ protected: } } - if(score < best_score) + constexpr float EPSILON = 25.0; + if(score + EPSILON < best_score) { best_score = score; best_i = i; |