Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# 3D Bin Packing for shipping [closed]

I try to implement optimisation for shipping product from my e-commerce website.

I don't use plugin for e-commerce, only asp.net mvc 5.

I ask FeDex API for shipping rate for all items in cart. So if the user have 3 item in cart it will calculate it like 3 package. I need a way to calculate what dimension will be the package and split it in more package if it exceed a dimension.

i have find example in c++ and php(Here and Here) but i don't know these languages ...

if you can help me finding c# example or help me convert this php to c# so i can understand how they work ...

Tanks!

EDIT:

i have found exacly what i need but it's in c ... i need to make a dll for it then use it on my app https://github.com/wknechtel/3d-bin-pack

like image 840
Benoit Avatar asked Apr 21 '15 18:04

Benoit


2 Answers

I recently finished a C# port of the same 3D bin packing algorithm:

https://github.com/davidmchapman/3DContainerPacking

I based the code on these two GitHub projects:

3d-bin-pack by wknechtel (C)
3dbinpackingjs by Kerem Demirer (JavaScript)

I also referenced the PDF of the original master's thesis by Erhan Baltacıoğlu, as needed. The project includes a set of 700 reference tests verifying that the algorithm output matches the results shown in Appendix E of the thesis.

like image 148
David M. Chapman Avatar answered Nov 09 '22 18:11

David M. Chapman


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 25
Kerem Demirer Avatar answered Nov 09 '22 18:11

Kerem Demirer