ExBoxPacker.Engine.VolumePacker (ExBoxPacker v0.2.0)

Copy Markdown View Source

Packs items into a single box. Functional port of BoxPacker's VolumePacker. Tries both box footprint rotations (unless single-pass or the item set forbids rotation) and each special first-item orientation, returning the permutation that packs the most (an exact full pack short-circuits; otherwise highest volume utilisation).

Summary

Functions

Pack items into box. opts: single_pass? (default false), strict_ordering? (default false). Returns a PackedBox (items that don't fit are simply absent).

Functions

pack(box, items, opts \\ [])

Pack items into box. opts: single_pass? (default false), strict_ordering? (default false). Returns a PackedBox (items that don't fit are simply absent).