Rewrite perimeter fuzzification functions to properly follow perimeter shape #13593
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.
The previous implementation of the fuzzy_polygon (classic perimeter generator) and fuzzy_extrusion_line (Arachne perimeter generator) did not work well at larger values for
Fuzzy skin point distance
. At higher values, the generator would start cutting corners, and overshooting at corners leading to incorrect overhangs being generated. The latter of these issues was reported in #7744.This PR is a complete rewrite of the fuzzification algorithm to work well with both small and large values for
Fuzzy skin point distance
. The table below shows a comparison between the old and new fuzzy skin generation algorithm between the old fuzzification algorithm (left), and the new fuzzification algorithm (right) at variousFuzzy skin point distance
values. (Note: the top infill has been hidden to better show the difference between the algorithms.)A brief summary of how the new algorithm works:
Since a new point is placed at x-locations where a corner point existed in the original line, the corner cutting that was visible in the original algorithm is avoided.
By cleverly picking the lengths of each of the segments (i.e. taking into account the remaining perimeter length), the outline can be closed with every segment length being in the acceptable range, thus not suffering from the overshoot present in the original algorithm