dvdoug / BoxPacker

4D bin packing / knapsack problem solver
MIT License
612 stars 156 forks source link

help need: how I get most matched box by 3d package finding? #242

Closed vidux closed 3 years ago

vidux commented 3 years ago

i calculate weight separately by summing up products weight, and need only consider about dimensions

per-defined boxes only have width , height and length eg: ( width , length , height ) box1 (20,30,20); box2 (30,50,25); box3 (40,60,35);

product also have width , height and length

( width , length , height , ,rotatable, qty) product1 (5,5,10, true, 1); product1 (8,8,10, true, 1); product1 (10,12,15, true, 1);

i just need to get matched index of the box. is it possible with this package without providing other details,(like depth,inner dimensions) ? thank you very much.

dvdoug commented 3 years ago

What you call height, the library probably calls depth - you can check the diagram at https://www.boxpacker.io/en/stable/getting-started.html to compare what you call the 3 dimensions with what the library uses.

For inner dimensions, my first recommendation would be to obtain them but as an alternative you could assume that inner = outer or inner = outer - 1mm?

vidux commented 3 years ago

yes i misunderstood height with depth. I created custom box class and changed its contractor to get required parameters . i think problem fixed. thank you again.