Cloudstek / php-laff

Largest Area Fit First (LAFF) 3D box packing algorithm class for PHP
MIT License
83 stars 32 forks source link

Stackable option? #12

Open by225 opened 5 years ago

by225 commented 5 years ago

Hello. It's great that you can see which level the items are on afterward. I need to be able to specify the level, i.e., heavier items need to be restricted to the first level only. Would it be difficult to implement something like this? Thank you.

mdeboer commented 5 years ago

Sure it would be possible yet that would require some serious changes. Currently the algorithm is a PHP implementation of "An Efficient Algorithm for 3D Rectangular Box Packing" paper by M. Zahid Gürbüz, Selim Akyokus, Ibrahim Emiroglu and Aysun Güran.

Weight has not been factored in but I suppose it could be added. Contributions are welcome as I'm flooded with work and don't have time at the moment to implement these features. I'm happy to accept contributions and discuss possible implementations though.

by225 commented 5 years ago

Thanks for the response. I will take a closer look at the current code when I get a chance. Really, though, it's not about weight, but just about being able to restrict certain items to the lowest level. Would that make changes any easier?

mdeboer commented 5 years ago

Sure would! Will pick this up when I get the time to work on this again.