An implementation of the 3D bin packing problem with weight as a fourth constraint: given items and a catalogue of boxes, how many cartons do you need, and what goes in each?
The same engine can also fill a single container (pallet, trailer, ocean box) as densely as possible and leave the rest unpacked.
Typical uses: e-commerce cartonization and shipping-cost calculation, warehouse box selection, and one-container load planning.
- Your own Item/Box objects (no wrapper DTOs)
- Rotation: any way up, keep-flat, or none
- Weight limits and automatic weight balancing across cartons
- Limited box stock, linked items, custom placement rules
- Packed x/y/z coordinates and a 3D visualiser
Requires PHP 8.2+. composer require dvdoug/boxpacker
See documentation for more details.
BoxPacker is MIT-licensed.
