Skip to content

v1.6.0

Compare
Choose a tag to compare
@dvdoug dvdoug released this 27 Aug 21:20

API-compatible backport of 2.4.0 to the v1 branch. All features present except 3D packing.

All users of v1 are highly recommended to upgrade to v2 which removes the "keep flat" limitation from v1.

  • Significant reworking of core packing logic to clarify concepts used and split out large functions into more readable pieces
  • Added getUsed[Width|Length|Depth]() on PackedBoxes to allow for better visibility into space utilisation
  • Added callback system for more complex constraints e.g. max number of hazardous items in a box. To take advantage of the additional flexibility, implement BoxPacker\ConstrainedItem rather than BoxPacker\Item
  • A specific ItemTooLargeException exception is now thrown when an item cannot fit inside any boxes rather than a generic \RuntimeException
  • Equal distribution of weight is now turned off when the number of boxes becomes large as it provides very little to no benefit at that scale and is slow to calculate