Unofficial Python bindings for libnest2d — 2D bin packing / polygon nesting
Project description
python-libnest2d
Unofficial Python bindings for libnest2d — a library for 2D bin packing / polygon nesting.
Based on pynest2d by Ultimaker B.V., repackaged for easy pip install.
pip install python-libnest2d
Quick Start
from pynest2d import Point, Box, Item, nest
# Define items as polygons
square = Item([Point(0, 0), Point(100, 0), Point(100, 100), Point(0, 100)])
triangle = Item([Point(0, 0), Point(100, 0), Point(50, 100)])
# Define the bin (sheet)
bin_shape = Box(1000, 1000)
# Pack items into bins
num_bins = nest([square, triangle], bin_shape, distance=5)
# Read results
for item in [square, triangle]:
t = item.translation()
print(f"Bin {item.binId()}: ({t.x()}, {t.y()}) rot={item.rotation():.2f}")
API
| Class | Description |
|---|---|
Point(x, y) |
2D integer coordinate |
Box(w, h) |
Rectangular bin |
Item(vertices) |
Polygonal item to nest |
NfpConfig() |
NFP placer configuration |
nest(items, bin, distance, config) |
Main nesting function |
Building from Source
Requires: CMake 3.20+, C++17 compiler, Python 3.8+
pip install .
License
LGPL-3.0-or-later — see LICENSE for full text.
| Component | License |
|---|---|
| pynest2d (bindings) | LGPL-3.0 — © Ultimaker B.V. |
| libnest2d (engine) | LGPL-3.0 — © Tamás Mészáros |
| Clipper | BSL-1.0 — © Angus Johnson |
| Boost | BSL-1.0 |
| NLopt | LGPL-2.1+ — © Steven G. Johnson |
| pybind11 | BSD-3-Clause |
This is NOT an official Ultimaker product. For the official version, see Ultimaker/pynest2d.
Source code: https://github.com/HamzaYslmn/python-libnest2d
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_libnest2d-0.1.3-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8e864651033a7497f466c56353e6d5c6e71f3b44220cfd7598cc38b535c7319
|
|
| MD5 |
64a6e8235b47c7172742f0fc694c0b02
|
|
| BLAKE2b-256 |
5d62c42b3d5fd8cf5174144788cd5fd5a17f0cc5f2cf60d7abb79ed659ee4708
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp313-cp313-win_amd64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp313-cp313-win_amd64.whl -
Subject digest:
b8e864651033a7497f466c56353e6d5c6e71f3b44220cfd7598cc38b535c7319 - Sigstore transparency entry: 1108456970
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_libnest2d-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae839990bdd31f9b60c6e00f5d06eef055d03d3977cfe095cd68b1674a99531e
|
|
| MD5 |
343c074d31c8522e050a955ca9b8f220
|
|
| BLAKE2b-256 |
d32433ec7aa4b2ce557c71e41a66464eed31fcfaaea000e02dc3eee3a8b2a919
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
ae839990bdd31f9b60c6e00f5d06eef055d03d3977cfe095cd68b1674a99531e - Sigstore transparency entry: 1108456990
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_libnest2d-0.1.3-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0084e53383c215a5566703b953c4638aeade5ecb3250fd3ab44dab533b25f348
|
|
| MD5 |
5627544bdb02caca1ef59145879e093b
|
|
| BLAKE2b-256 |
bf9d4d128b6428d1cd2ef6f925270a74a669f831462d6b6ad5e8ac81a00fd384
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp312-cp312-win_amd64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp312-cp312-win_amd64.whl -
Subject digest:
0084e53383c215a5566703b953c4638aeade5ecb3250fd3ab44dab533b25f348 - Sigstore transparency entry: 1108456976
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_libnest2d-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7de467b5afd5451a861747b56e2e0ec4e0f2e07f453fc1802f003e0947b0e30
|
|
| MD5 |
8cab0733480171f550998907ea48b61c
|
|
| BLAKE2b-256 |
4f70ff657e7be57f000262e1002498e3cc4571c73d8c0f1dc30f26593500c27a
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
f7de467b5afd5451a861747b56e2e0ec4e0f2e07f453fc1802f003e0947b0e30 - Sigstore transparency entry: 1108456992
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_libnest2d-0.1.3-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e6c802e757cc75a4134d8160f5c2afff2f22192f7337ca90831f825d006f906
|
|
| MD5 |
60abf13f93b8567523729d4173b6f1d2
|
|
| BLAKE2b-256 |
a17fb4089649e0dead34ce4473758ad922b7889d85482b1467fe057e4a5181cb
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp311-cp311-win_amd64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp311-cp311-win_amd64.whl -
Subject digest:
8e6c802e757cc75a4134d8160f5c2afff2f22192f7337ca90831f825d006f906 - Sigstore transparency entry: 1108456996
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_libnest2d-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d452565ca44101e452529a35ff6ca58ac3015d3244c017eeb833f20a30d66e8c
|
|
| MD5 |
ee7c36bd3d0dc20f6bb67272758e5f4b
|
|
| BLAKE2b-256 |
ae05f2bdcf8ee4bd07622db0c4d495a8669db5b67ea0b48f779964a9109ad845
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
d452565ca44101e452529a35ff6ca58ac3015d3244c017eeb833f20a30d66e8c - Sigstore transparency entry: 1108457014
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_libnest2d-0.1.3-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84ad58d2bde15d7ba4241897e8430b69880f222bfc3b1e34313591d124c921f8
|
|
| MD5 |
611134743ffe04ee8595e3925cd204c5
|
|
| BLAKE2b-256 |
b0744aa63d421e6a745fe4a051e175f7477398b5ed3c9fa82818a1fe9381a63a
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp310-cp310-win_amd64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp310-cp310-win_amd64.whl -
Subject digest:
84ad58d2bde15d7ba4241897e8430b69880f222bfc3b1e34313591d124c921f8 - Sigstore transparency entry: 1108456968
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_libnest2d-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e25d406302d0080e93dcda6f5937a714944bed2062f2f63b7d1ba029f0da621
|
|
| MD5 |
94f9218caa7e9da76b0fa2ba24c9b50e
|
|
| BLAKE2b-256 |
926b616287af0afc6074c6ed4d40d71d6cac44c1e9ea697360cc72db9622adc2
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
7e25d406302d0080e93dcda6f5937a714944bed2062f2f63b7d1ba029f0da621 - Sigstore transparency entry: 1108457003
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_libnest2d-0.1.3-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49776fa7daba5821cd2b3b6fc059e5128c897876c256a55e38c7dca5f38baf6f
|
|
| MD5 |
315ba3af7194fc220038447111d713f4
|
|
| BLAKE2b-256 |
9b42db3a4eed73db19d3435fc01c6c6af3b7d8872df487b37d630b613e29bc87
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp39-cp39-win_amd64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp39-cp39-win_amd64.whl -
Subject digest:
49776fa7daba5821cd2b3b6fc059e5128c897876c256a55e38c7dca5f38baf6f - Sigstore transparency entry: 1108456983
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_libnest2d-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: python_libnest2d-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4b2ddfb41cb8033c3515202ea74e73733aced6a07825e026cbf426808116510
|
|
| MD5 |
a2091cae3f05356ce9a7bb0e1b2f0512
|
|
| BLAKE2b-256 |
561e08008e6d111a0cbf5ece06baa1ff9c6265e57d4d8f7212b5c5ccb0a94e12
|
Provenance
The following attestation bundles were made for python_libnest2d-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
build-wheels.yml on HamzaYslmn/python-libnest2d
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_libnest2d-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
d4b2ddfb41cb8033c3515202ea74e73733aced6a07825e026cbf426808116510 - Sigstore transparency entry: 1108457009
- Sigstore integration time:
-
Permalink:
HamzaYslmn/python-libnest2d@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/HamzaYslmn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@2886ce7bcaacda6d8bdf7af5a681dc95e9ee5d97 -
Trigger Event:
push
-
Statement type: