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
is it possible to use this without setting bin sizes? In my scenario I just want all my rectangles to fit in the smallest space possible, whatever that shape may be
The text was updated successfully, but these errors were encountered:
Not directly but it can be used to find an approximation. For example:
Get the total area of the rectangles to find the side of the square where they would all fit with a perfect packing.
side=sqrt(sum(r.area() forrinrectangles))
Create a packer using pack_algo= MaxRectsBlsf and sort_algo = SORT_LSIDE
Add a bin with the same width as the square, and ten times its height
Pack all the rectangles and search the result for the one at the top.
The minimum height for the bin to fit all the rectangles is the top of the previous rectangle.
The packing will not be perfect but you can play with the initial width, rectangle order, algorithms, and search for the combination wasting less area in the packing.
is it possible to use this without setting bin sizes? In my scenario I just want all my rectangles to fit in the smallest space possible, whatever that shape may be
The text was updated successfully, but these errors were encountered: