You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Packing is a np-hard problem so the algorithms used are heuristic, this means that they usually won't find the optimal solution.
But you can improve your solution in two ways:
If the number of rectangles is small you can search all the possible combinations using DFS and choose the optimal.
If the number of rectangles is too big, you can use this library and create several packers with different algorithms and options, then choose the best packing between them.
Hi,
I tried to pack 2 by 3 rectangles to bin sized 4 by 6. If I enable rotation, I get 3 packed rectangles instead 4:
With rotation disabled I get 4 packed rectangles as expected.
I'm running with default settings:
packer = newPacker(rotation=False)
How to fix this?
The text was updated successfully, but these errors were encountered: