Items are overlapped in some cases which provides incorrect results sometimes
Opened this issue · 2 comments
Hi @dvdoug,
I loved the BoxPacker that you created and it seems to be working fine most of the times but in certain test cases I have observed that the items are not correctly stacked which results in inconsistent results.
I compared the results with the bin packer provided by - https://www.3dbinpacking.com which shows the 3D representation of packed items and below are the parameters that I used.
As you can see it packs the 18 items in a single medium box but when I try the same with BoxPacker implementation the items are packed in a medium (15 items) and a small box (3 items).
To further debug the issue I mapped the items from medium box into 3D cubes using threeJS and below are my findings -
As you can see some of the items are overlapping and not stacked correctly. You can check my implementation demo here -
https://clarteresearch.com/projects/BoxSizeCalculator3D/
Here is the repo for the above demo -
https://github.com/AdityaRawat96/BoxSizeCalculator
Thanks!
I'll take a look, seems to be case of the first item being placed in a different orientation, and then everything else being a knock-on consequence of that.
Hopefully 🤞 this one should be fairly straightforward, as all items have the same dimensions so there's no issue around sorting, only placement