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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

py3dbp-0.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file py3dbp-0.3-py3-none-any.whl.

File metadata

  • Download URL: py3dbp-0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for py3dbp-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 df0ee9cdf835c7002e6145f4f91ecf4a88d6d7b58d460965f434e4d9d7eae2d1
MD5 c4010bd1f72cb18474e20bee3e16d204
BLAKE2b-256 2ab17ac7ed150708226a1a0480414f6706278433827904c73a5dde5839f9096e

See more details on using hashes here.

Supported by

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