Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

3d bin packing algorithm [closed]

I am looking for a deterministic implementation for any 3d bin packing algorithm, i.e. for packing many small and different cuboids inside one or many bigger ones. The solution could vary from the optimal one.

It should be written in C, C++, Java, C#, IronPython, IronRuby or any other language an can bin to from .Net code.

I found this C algorithm http://www.diku.dk/hjemmesider/ansatte/pisinger/3dbpp.c , but it doesn’t rotate the cuboids to find the best fit. I am ok with not rotating them upside down, but horizontal rotation should be possible.

like image 298
Mouk Avatar asked Oct 13 '09 22:10

Mouk


2 Answers

I have written an approximate algorithm for the case you describe i.e. 3D rectangular boxes, with orthogonal rotation, in C++. You can find the results and algorithm in the published paper: http://www.cs.ukzn.ac.za/publications/erick_dube_507-034.pdf

like image 199
user320450 Avatar answered Sep 25 '22 07:09

user320450


I converted wknechtel/3d-bin-pack C code to javascript. Can be easily port to C#.

https://github.com/keremdemirer/3dbinpackingjs

You can run example calculations from index.html file and review the generated report. pack1.js file contains the app and algorithm. I'm not sure how the algorithm works but the results are satisfying for packaging calculations.

like image 22
Kerem Demirer Avatar answered Sep 26 '22 07:09

Kerem Demirer