3D Packing algorithm

Started by
0 comments, last by etran1 22 years, 8 months ago
I''m writing a web application which needs to calculate shipping costs based on the size of a package. This package contains smaller packages for individual products. I need an algorithm that will give me the best way to pack them while taking up the least amount of space. Any suggestions, recommendations would be helpful and appreciated. It would even be better if there was also some source code. Thanks Eric
Advertisement
I haven''t ever tried to write this out as an algorithm, but I would attack it by taking the dimensions of the largest item and use it for a base point for the package. Then go from there, adding items to the package in order from largest -> smallest, and trying not to grow the package by staying inside your current dimensions.

By the time you get to the smaller items, they have a higher chance of filling in ''filler-space'' than if you went from a small items -> large item method.

This topic is closed to new replies.

Advertisement