fix: Address nesting regression in auto arrange after 2.9.0#15264
Open
mjonuschat wants to merge 1 commit intoprusa3d:masterfrom
Open
fix: Address nesting regression in auto arrange after 2.9.0#15264mjonuschat wants to merge 1 commit intoprusa3d:masterfrom
mjonuschat wants to merge 1 commit intoprusa3d:masterfrom
Conversation
Reverts calling union_parallel_reduce() in project_mesh(), going back to union_(top, bottom). The parallel reduction splits polygons into chunks and merges them pairwise. The problem is that _clipper() uses pftNonZero throughout, so when partial results containing holes get merged, pftNonZero fills them in. By the time all chunks are combined the holes are gone. This matters because project_mesh() feeds the 2D footprint to the NFP arrange engine, which finds valid nesting positions by looking for clockwise hole polygons after the union. No holes means no nesting positions, so objects that should fit inside concave regions get placed beside them instead. Parallelizing this correctly would need union_ to use pftEvenOdd, which has broader implications and should be tackled separately. Closes prusa3d#14202
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reverts calling union_parallel_reduce() in project_mesh(), going back
to union_(top, bottom).
The parallel reduction splits polygons into chunks and merges them
pairwise. The problem is that _clipper() uses pftNonZero throughout, so
when partial results containing holes get merged, pftNonZero fills them
in. By the time all chunks are combined the holes are gone.
This matters because project_mesh() feeds the 2D footprint to the NFP
arrange engine, which finds valid nesting positions by looking for
clockwise hole polygons after the union. No holes means no nesting
positions, so objects that should fit inside concave regions get placed
beside them instead.
Parallelizing this correctly would need union_ to use pftEvenOdd, which
has broader implications and should be tackled separately.
Closes #14202