Skip to main content

3D Bin Packing

Project description

3D Bin Packing

3D Bin Packing implementation based on this paper. The code is based on gedex implementation in Go.

Install

pip install py3dbp

Usage

from main import Packer, Bin, Item

# Create the new packer
packer = Packer()

# Add the bins
packer.add_bin(Bin("Small Bin", 15, 15, 15, 10))

# Add the items
packer.add_item(Item("Item 1", 8, 15, 10, 20))
packer.add_item(Item("Item 2", 9, 10, 15, 20))

# Pack the items into de bins
packer.pack()

# Iterate the bins to show the items that contains
for b in packer.bins:
    print(b.string())
    for i in b.items:
        print("====> ", i.string())

Credit

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py3dbp-0.4.tar.gz (3.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page