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 details)

Uploaded Source

File details

Details for the file py3dbp-0.4.tar.gz.

File metadata

  • Download URL: py3dbp-0.4.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.8

File hashes

Hashes for py3dbp-0.4.tar.gz
Algorithm Hash digest
SHA256 8b984820f5428596da4d28b10b5d92d942c530588f6556d139ddf845b22bbae8
MD5 673d98fb2a80bb98c8119612bb819f97
BLAKE2b-256 e281c3df698cb78f3df8d1ada767aaffe43cbf40cb4b1e3de1a36b6591c7a6ea

See more details on using hashes here.

Supported by

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