Cloudstek / php-laff

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

Pack locations #8

Open luenib opened 7 years ago

luenib commented 7 years ago

I have tested your class and it works great every time. Very good work.

I actually have a questions: where do I get the location of the boxes inside the container? I have manually placed my boxes in the contained guided by the results provided by your class. I know it works, but I haven't been able to find the line of code that sets the coordinates for each box.

Thanks a lot.

mdeboer commented 7 years ago

Thanks @luenib, appreciated!

To be fair, it's been years since I put this together. I had a quick glance but it seems it needs some work to get the coordinates (eg. exact layout). I will play around with this and see if I can generate a graphical "map" of the boxes in the container. This would not only make things easier to debug but also would help you pack I suppose.

luenib commented 7 years ago

Thanks for the quick response.

I'm using isomer.js for the graphic representation of the packs inside the container. Nothing fancy but it works very well. You can take a look at it here: https://jsfiddle.net/luenib/6op8ockr/

The packs are hard coded by I think I can feed an array with the packs (and coordinates) returned by your class.

Thanks again.

mdeboer commented 7 years ago

@luenib awesome, that saves me so much work and probably makes debugging a lot easier (at least for me lol). I'll see with I can do and will try to make it work with isomer. Unfortunately can't give a time estimate but I'll keep you posted.

luenib commented 7 years ago

Thank you. All the effort you have put in this work and all the future effort are greatly appreciated.