PHPackages                             keydev/laff-analyzer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. keydev/laff-analyzer

ActiveLibrary

keydev/laff-analyzer
====================

PHP Implementation of the Largest Area Fit First (LAFF) 3D (three dimension) box packing algorithm

0.1(3y ago)0338MITPHPPHP &gt;=8.1

Since Jul 12Pushed 1y agoCompare

[ Source](https://github.com/ax1mx2/laff-analyzer)[ Packagist](https://packagist.org/packages/keydev/laff-analyzer)[ GitHub Sponsors](https://github.com/stloyd)[ RSS](/packages/keydev-laff-analyzer/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (2)Used By (0)

PHP-LAFF Analyzer
=================

[](#php-laff-analyzer)

PHP Implementation of the Largest Area Fit First (LAFF) 3D (three dimensions: length, width, height) box packing algorithm.

With this library you can easily:

- get the required dimensions of the container that will fit all given packages,
- split packages per defined amount of containers,
- split packages per layer in a given container,
- get information about the wasted amount of space per container and per layer,
- get the number of remaining packages that couldn't fit into given containers,

Algorithm definition
--------------------

[](#algorithm-definition)

Implementation of the used algorithm was defined by M. Zahid Gürbüz, Selim Akyokus, Ibrahim Emiroglu, and Aysun Güran in a paper called ["An Efficient Algorithm for 3D Rectangular Box Packing"](http://www.zahidgurbuz.com/yayinlar/An%20Efficient%20Algorithm%20for%203D%20Rectangular%20Box%20Packing.pdf).

Installation
------------

[](#installation)

> **Note**To use this library you need PHP in version 8.1+

```
composer require keydev/laff-analyzer
```

Usage
-----

[](#usage)

### Get the size of the required container for selected packages

[](#get-the-size-of-the-required-container-for-selected-packages)

```
