@well20152016 wrote:
Minimum rectangle
The smallest rectangle of two polygons.
For simple shapes where aligning the edges works this could be done:
Start at one edge of polygon A.
Align one edge of polygon B with the edge of A. Slide B along the edge, searching for the minimum
area of the bounding box among the non-intersecting locations.
Repeat for all edges of B.
Repeat for all edges of A.
Things get more interesting when we allow more complicated geometry, where aligned edges are not necessarily the minimum area: think about trying to nest a W and an E shape. Another complication would be allowed mirroring or forced directions.
- which probably explains why most nesting programs are commercial products.
--