Skip to content

fix: Address nesting regression in auto arrange after 2.9.0#15264

Open
mjonuschat wants to merge 1 commit intoprusa3d:masterfrom
mjonuschat:bugfix/arrange-nesting-regression
Open

fix: Address nesting regression in auto arrange after 2.9.0#15264
mjonuschat wants to merge 1 commit intoprusa3d:masterfrom
mjonuschat:bugfix/arrange-nesting-regression

Conversation

@mjonuschat
Copy link
Contributor

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto Arrange Object Nesting Regression from 2.8.1 to 2.9.0

1 participant