Skip to content

Support input of container sizes #2

@nilsga

Description

@nilsga

If you extend this script to also support an array of possible container sizes, and then finding the combination that fits all boxes, it would be even more perfect :)

Example:

$container_sizes = array(
    array(
        'length' => 10,
        'height' => 5,
        'width' => 25
    ),
    array(
        'length' => 15,
        'height' => 15,
        'width' => 40
    )
);

$boxes = array(); // Boxes with dimensions

$packer = new LAFFPacker();
$packer->pack($boxes, $container_sizes);

$containers = $packer->get_containers(); // Array of containers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions