BoxPacker icon indicating copy to clipboard operation
BoxPacker copied to clipboard

Weird packing process

Open pikil opened this issue 5 years ago • 5 comments

Hi there, Could you please have a look at two packs below. The first one is working with keepFlat flag enabled and another one without. Both variants use the same list of boxes (please see jsons).

Many thanks for your help!

Screen Shot 2020-02-29 at 10 22 10 AM Screen Shot 2020-02-29 at 10 22 29 AM

{ "length": 2485, "width": 900, "height": 839, "weight": 344, "volume": 1.8764235, "packedBoxes": [ { "ref": "2632-1", "length": 1155, "width": 585, "height": 195, "weight": 55.6, "xPos": 0, "yPos": 0, "zPos": 0 }, { "ref": "2455-1", "length": 903, "width": 400, "height": 337, "weight": 7.3, "xPos": 0, "yPos": 1155, "zPos": 0 }, { "ref": "10-1", "length": 980, "width": 725, "height": 126, "weight": 43.5, "xPos": 0, "yPos": 0, "zPos": 447 }, { "ref": "56-1", "length": 1503, "width": 595, "height": 94, "weight": 32.6, "xPos": 0, "yPos": 980, "zPos": 447 }, { "ref": "8-1", "length": 584, "width": 880, "height": 110, "weight": 29.3, "xPos": 0, "yPos": 0, "zPos": 337 }, { "ref": "27-1", "length": 586, "width": 850, "height": 100, "weight": 27.5, "xPos": 0, "yPos": 584, "zPos": 337 }, { "ref": "12913-2", "length": 1350, "width": 614, "height": 52, "weight": 13, "xPos": 0, "yPos": 0, "zPos": 635 }, { "ref": "12913-1", "length": 1350, "width": 614, "height": 52, "weight": 13, "xPos": 0, "yPos": 0, "zPos": 573 }, { "ref": "46-1", "length": 584, "width": 844, "height": 78, "weight": 16.3, "xPos": 0, "yPos": 1170, "zPos": 337 }, { "ref": "3912-2", "length": 635, "width": 900, "height": 52, "weight": 8, "xPos": 0, "yPos": 1754, "zPos": 389 }, { "ref": "3912-1", "length": 635, "width": 900, "height": 52, "weight": 8, "xPos": 0, "yPos": 1754, "zPos": 337 }, { "ref": "12909-1", "length": 1347, "width": 327, "height": 52, "weight": 9.5, "xPos": 0, "yPos": 0, "zPos": 687 }, { "ref": "4630-1", "length": 977, "width": 305, "height": 62, "weight": 9, "xPos": 0, "yPos": 1350, "zPos": 573 }, { "ref": "4262-1", "length": 427, "width": 747, "height": 52, "weight": 8.5, "xPos": 0, "yPos": 2058, "zPos": 0 }, { "ref": "12849-1", "length": 377, "width": 747, "height": 52, "weight": 7.5, "xPos": 0, "yPos": 2058, "zPos": 52 }, { "ref": "3906-1", "length": 336, "width": 795, "height": 46, "weight": 5, "xPos": 0, "yPos": 1350, "zPos": 635 }, { "ref": "1521-1", "length": 600, "width": 150, "height": 65, "weight": 3.5, "xPos": 747, "yPos": 0, "zPos": 0 }, { "ref": "1522-1", "length": 600, "width": 150, "height": 65, "weight": 3.5, "xPos": 747, "yPos": 0, "zPos": 65 }, { "ref": "1522-2", "length": 600, "width": 150, "height": 65, "weight": 3.5, "xPos": 747, "yPos": 0, "zPos": 130 }, { "ref": "237-3", "length": 760, "width": 105, "height": 30, "weight": 1, "xPos": 747, "yPos": 600, "zPos": 60 }, { "ref": "237-2", "length": 760, "width": 105, "height": 30, "weight": 1, "xPos": 747, "yPos": 600, "zPos": 30 }, { "ref": "237-1", "length": 760, "width": 105, "height": 30, "weight": 1, "xPos": 747, "yPos": 600, "zPos": 0 }, { "ref": "1092-9", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 725, "yPos": 1000, "zPos": 447 }, { "ref": "1092-8", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 725, "yPos": 800, "zPos": 447 }, { "ref": "1092-7", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 725, "yPos": 600, "zPos": 447 }, { "ref": "1092-6", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 725, "yPos": 400, "zPos": 447 }, { "ref": "1092-5", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 725, "yPos": 200, "zPos": 447 }, { "ref": "1092-4", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 725, "yPos": 0, "zPos": 447 }, { "ref": "1092-11", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1360, "zPos": 0 }, { "ref": "1092-12", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1360, "zPos": 100 }, { "ref": "1092-1", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 600, "zPos": 90 }, { "ref": "1092-3", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 2160, "zPos": 200 }, { "ref": "1092-23", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 2160, "zPos": 100 }, { "ref": "1092-22", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 2160, "zPos": 0 }, { "ref": "1092-21", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1960, "zPos": 200 }, { "ref": "1092-10", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 600, "zPos": 190 }, { "ref": "1092-2", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1960, "zPos": 0 }, { "ref": "1092-19", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1760, "zPos": 200 }, { "ref": "1092-18", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1760, "zPos": 100 }, { "ref": "1092-17", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1760, "zPos": 0 }, { "ref": "1092-16", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1560, "zPos": 200 }, { "ref": "1092-15", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1560, "zPos": 100 }, { "ref": "1092-14", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1560, "zPos": 0 }, { "ref": "1092-13", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1360, "zPos": 200 }, { "ref": "1092-20", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 1960, "zPos": 100 } ] }

Screen Shot 2020-02-29 at 10 30 32 AM

Screen Shot 2020-02-29 at 10 30 52 AM

{ "length": 2485, "width": 900, "height": 1125, "weight": 344, "volume": 2.5160625, "packedBoxes": [ { "ref": "2632-1", "length": 1155, "width": 585, "height": 195, "weight": 55.6, "xPos": 0, "yPos": 0, "zPos": 0 }, { "ref": "2455-1", "length": 903, "width": 337, "height": 400, "weight": 7.3, "xPos": 0, "yPos": 1155, "zPos": 0 }, { "ref": "10-1", "length": 980, "width": 725, "height": 126, "weight": 43.5, "xPos": 0, "yPos": 0, "zPos": 510 }, { "ref": "56-1", "length": 1503, "width": 595, "height": 94, "weight": 32.6, "xPos": 0, "yPos": 980, "zPos": 510 }, { "ref": "8-1", "length": 584, "width": 880, "height": 110, "weight": 29.3, "xPos": 0, "yPos": 0, "zPos": 400 }, { "ref": "27-1", "length": 586, "width": 850, "height": 100, "weight": 27.5, "xPos": 0, "yPos": 584, "zPos": 400 }, { "ref": "12913-2", "length": 1350, "width": 614, "height": 52, "weight": 13, "xPos": 0, "yPos": 0, "zPos": 698 }, { "ref": "12913-1", "length": 1350, "width": 614, "height": 52, "weight": 13, "xPos": 0, "yPos": 0, "zPos": 636 }, { "ref": "46-1", "length": 584, "width": 844, "height": 78, "weight": 16.3, "xPos": 0, "yPos": 1170, "zPos": 400 }, { "ref": "3912-2", "length": 635, "width": 900, "height": 52, "weight": 8, "xPos": 0, "yPos": 1754, "zPos": 452 }, { "ref": "3912-1", "length": 635, "width": 900, "height": 52, "weight": 8, "xPos": 0, "yPos": 1754, "zPos": 400 }, { "ref": "12909-1", "length": 1347, "width": 52, "height": 327, "weight": 9.5, "xPos": 795, "yPos": 0, "zPos": 698 }, { "ref": "4630-1", "length": 977, "width": 305, "height": 62, "weight": 9, "xPos": 0, "yPos": 1350, "zPos": 636 }, { "ref": "4262-1", "length": 427, "width": 747, "height": 52, "weight": 8.5, "xPos": 0, "yPos": 2058, "zPos": 0 }, { "ref": "12849-1", "length": 377, "width": 747, "height": 52, "weight": 7.5, "xPos": 0, "yPos": 2058, "zPos": 52 }, { "ref": "3906-1", "length": 336, "width": 795, "height": 46, "weight": 5, "xPos": 0, "yPos": 1350, "zPos": 698 }, { "ref": "1521-1", "length": 600, "width": 150, "height": 65, "weight": 3.5, "xPos": 747, "yPos": 0, "zPos": 0 }, { "ref": "1522-1", "length": 600, "width": 150, "height": 65, "weight": 3.5, "xPos": 747, "yPos": 0, "zPos": 65 }, { "ref": "1522-2", "length": 600, "width": 150, "height": 65, "weight": 3.5, "xPos": 747, "yPos": 0, "zPos": 130 }, { "ref": "237-1", "length": 760, "width": 105, "height": 30, "weight": 1, "xPos": 747, "yPos": 600, "zPos": 0 }, { "ref": "237-2", "length": 760, "width": 105, "height": 30, "weight": 1, "xPos": 747, "yPos": 600, "zPos": 30 }, { "ref": "237-3", "length": 760, "width": 105, "height": 30, "weight": 1, "xPos": 747, "yPos": 600, "zPos": 60 }, { "ref": "1092-11", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1360, "zPos": 0 }, { "ref": "1092-6", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 2160, "zPos": 200 }, { "ref": "1092-1", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 600, "zPos": 90 }, { "ref": "1092-9", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 2360, "zPos": 0 }, { "ref": "1092-8", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 2260, "zPos": 200 }, { "ref": "1092-7", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 2260, "zPos": 0 }, { "ref": "1092-5", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 2160, "zPos": 0 }, { "ref": "1092-12", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1360, "zPos": 200 }, { "ref": "1092-4", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 2060, "zPos": 200 }, { "ref": "1092-3", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 2060, "zPos": 0 }, { "ref": "1092-23", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1960, "zPos": 200 }, { "ref": "1092-22", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1960, "zPos": 0 }, { "ref": "1092-21", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1860, "zPos": 200 }, { "ref": "1092-10", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 747, "yPos": 600, "zPos": 290 }, { "ref": "1092-2", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1760, "zPos": 200 }, { "ref": "1092-19", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1760, "zPos": 0 }, { "ref": "1092-18", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1660, "zPos": 200 }, { "ref": "1092-17", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1660, "zPos": 0 }, { "ref": "1092-16", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1560, "zPos": 200 }, { "ref": "1092-15", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1560, "zPos": 0 }, { "ref": "1092-14", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1460, "zPos": 200 }, { "ref": "1092-13", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1460, "zPos": 0 }, { "ref": "1092-20", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 747, "yPos": 1860, "zPos": 0 } ] }

pikil avatar Feb 28 '20 21:02 pikil

Hi @pikil

Before I take a look in detail, could I please just check if you've plotted using the correct axes? I've had a few reports about weird packings that have been down to confusion about which dimension/direction the co-ordinate system used by BoxPacker is, as sometimes people use a different one.

https://www.boxpacker.io/en/master/getting-started.html and https://www.boxpacker.io/en/master/advanced-usage.html have the relevant diagrams.

Thanks, Doug

dvdoug avatar Apr 10 '20 18:04 dvdoug

Hi Doug, Sure, no problem ;) Unfortunately, I had to move on, so I do not have the calculation for the exact example above available, but I'll just use the similar numbers from scratch, as that is easier with regards to screenshots.

  • The big Plate like panel at the bottom of the screenshots (below the beginning of coordinates) is a standard pallet and is not included in the calculations, it just dictates the measurements of the 'box'. It's height is standard and equals 100mm (included in the frame measurements).

Many thanks Doug!


Screen Shot 2020-04-11 at 7 37 50 AM


Screen Shot 2020-04-11 at 7 50 44 AM


Screen Shot 2020-04-11 at 7 56 35 AM


Screen Shot 2020-04-11 at 8 01 12 AM


The new boxes array I used for those screenshots: { "ref": "3169-1", "length": 600, "width": 900, "height": 250, "weight": 4.5, "xPos": 0, "yPos": 0, "zPos": 200 }, { "ref": "2632-1", "length": 1155, "width": 585, "height": 195, "weight": 55.6, "xPos": 0, "yPos": 600, "zPos": 200 }, { "ref": "19-1", "length": 2155, "width": 609, "height": 96, "weight": 44, "xPos": 0, "yPos": 0, "zPos": 0 }, { "ref": "10-1", "length": 980, "width": 725, "height": 126, "weight": 43.5, "xPos": 0, "yPos": 0, "zPos": 450 }, { "ref": "20-1", "length": 982, "width": 609, "height": 122, "weight": 44, "xPos": 0, "yPos": 980, "zPos": 450 }, { "ref": "27-1", "length": 586, "width": 850, "height": 100, "weight": 27.5, "xPos": 0, "yPos": 1755, "zPos": 200 }, { "ref": "2450-2", "length": 2260, "width": 627, "height": 30, "weight": 15.7, "xPos": 0, "yPos": 0, "zPos": 776 }, { "ref": "2450-1", "length": 2260, "width": 627, "height": 30, "weight": 15.7, "xPos": 0, "yPos": 0, "zPos": 576 }, { "ref": "1083-1", "length": 490, "width": 840, "height": 55, "weight": 3.5, "xPos": 0, "yPos": 1962, "zPos": 450 }, { "ref": "1916-1", "length": 910, "width": 30, "height": 605, "weight": 5.9, "xPos": 627, "yPos": 0, "zPos": 776 }, { "ref": "1923-2", "length": 2450, "width": 168, "height": 30, "weight": 7, "xPos": 627, "yPos": 0, "zPos": 606 }, { "ref": "1923-1", "length": 2450, "width": 168, "height": 30, "weight": 7, "xPos": 627, "yPos": 0, "zPos": 576 }, { "ref": "3906-1", "length": 336, "width": 795, "height": 46, "weight": 5, "xPos": 0, "yPos": 2155, "zPos": 0 }, { "ref": "1522-2", "length": 600, "width": 65, "height": 150, "weight": 3.5, "xPos": 795, "yPos": 0, "zPos": 0 }, { "ref": "1522-1", "length": 65, "width": 600, "height": 150, "weight": 3.5, "xPos": 0, "yPos": 2406, "zPos": 200 }, { "ref": "1521-1", "length": 65, "width": 600, "height": 150, "weight": 3.5, "xPos": 0, "yPos": 2341, "zPos": 200 }, { "ref": "237-2", "length": 760, "width": 105, "height": 30, "weight": 1, "xPos": 795, "yPos": 600, "zPos": 30 }, { "ref": "237-1", "length": 760, "width": 105, "height": 30, "weight": 1, "xPos": 795, "yPos": 600, "zPos": 0 }, { "ref": "237-3", "length": 760, "width": 105, "height": 30, "weight": 1, "xPos": 795, "yPos": 600, "zPos": 60 }, { "ref": "1092-13", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 1760, "zPos": 0 }, { "ref": "1092-11", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 1560, "zPos": 0 }, { "ref": "1092-9", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 400, "zPos": 576 }, { "ref": "1092-8", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 300, "zPos": 576 }, { "ref": "1092-7", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 200, "zPos": 576 }, { "ref": "1092-6", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 100, "zPos": 576 }, { "ref": "1092-5", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 0, "zPos": 576 }, { "ref": "1092-4", "length": 200, "width": 100, "height": 100, "weight": 0.3, "xPos": 627, "yPos": 0, "zPos": 636 }, { "ref": "1092-12", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 1660, "zPos": 0 }, { "ref": "1092-3", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 0, "yPos": 2360, "zPos": 576 }, { "ref": "1092-19", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 2360, "zPos": 0 }, { "ref": "1092-2", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 0, "yPos": 2260, "zPos": 576 }, { "ref": "1092-14", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 1860, "zPos": 0 }, { "ref": "1092-15", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 1960, "zPos": 0 }, { "ref": "1092-16", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 2060, "zPos": 0 }, { "ref": "1092-10", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 1460, "zPos": 0 }, { "ref": "1092-17", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 2160, "zPos": 0 }, { "ref": "1092-18", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 2260, "zPos": 0 }, { "ref": "1092-1", "length": 100, "width": 100, "height": 200, "weight": 0.3, "xPos": 795, "yPos": 1360, "zPos": 0 }, { "ref": "1079-1", "length": 720, "width": 60, "height": 10, "weight": 0.2, "xPos": 840, "yPos": 0, "zPos": 450 } ], "pRawSize": { "length": 2400, "width": 900, "height": 100, "weight": 30 }

P.S. Happy to provide ItemBox class if needed.

pikil avatar Apr 10 '20 20:04 pikil

Hi Doug, The updated version 3.6.0 seems to pack boxes much better now, thanks a lot for the changes! Let me know if you need to see the new images for the same list - happy to provide that.

Thanks, Ilia.

pikil avatar Apr 29 '20 04:04 pikil

Awesome, good to hear. I think there are potentially more improvements that could be made here so I'll keep this open for now

dvdoug avatar May 01 '20 16:05 dvdoug

Hi Doug, Yeah, absolutely. Thanks for your effort!

Cheers, Ilia.

pikil avatar May 02 '20 03:05 pikil