Search code examples
c#algorithmbin-packing

c# 3D Bin Packing for shipping


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


Solution

  • 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.