secnot / rectpack

Python 2D rectangle packing library
Apache License 2.0
453 stars 101 forks source link

without preset bin sizes #19

Open gareth-ib opened 6 years ago

gareth-ib commented 6 years ago

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

secnot commented 6 years ago

Hi

Not directly but it can be used to find an approximation. For example:

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.