![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/dvdoug/boxpacker/docs/ |
.. _positional_information: Positional information ====================== It is possible to see the precise positional and dimensional information of each item as packed. This is exposed as x,y,z co-ordinates from origin, alongside width/length/depth in the packed orientation. :: z y | / | / | / |/ 0------x Example: .. code-block:: php <?php // assuming packing already took place foreach ($packedBoxes as $packedBox) { $packedItems = $packedBox->getItems(); foreach ($packedItems as $packedItem) { // $packedItem->getItem() is your own item object echo $packedItem->getItem()->getDescription() . ' was packed at co-ordinate ' ; echo '(' . $packedItem->getX() . ', ' . $packedItem->getY() . ', ' . $packedItem->getZ() . ') with '; echo 'l' . $packedItem->getLength() . ', w' . $packedItem->getWidth() . ', d' . $packedItem->getDepth(); echo PHP_EOL; } }