Skip to main content

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

Metadata

Release files for python-libnest2d 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for python-libnest2d 0.1.3
File
python_libnest2d-0.1.3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
python_libnest2d-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
python_libnest2d-0.1.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
python_libnest2d-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
python_libnest2d-0.1.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
python_libnest2d-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
python_libnest2d-0.1.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
python_libnest2d-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
python_libnest2d-0.1.3-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
python_libnest2d-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details

Total release size: 11.8 MB

Release files / python_libnest2d-0.1.3-cp313-cp313-win_amd64.whl

Download URL python_libnest2d-0.1.3-cp313-cp313-win_amd64.whl
Size 1.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b8e864651033a7497f466c56353e6d5c6e71f3b44220cfd7598cc38b535c7319
BLAKE2b-256 checksum
How to use checksums
5d62c42b3d5fd8cf5174144788cd5fd5a17f0cc5f2cf60d7abb79ed659ee4708
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / python_libnest2d-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL python_libnest2d-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ae839990bdd31f9b60c6e00f5d06eef055d03d3977cfe095cd68b1674a99531e
BLAKE2b-256 checksum
How to use checksums
d32433ec7aa4b2ce557c71e41a66464eed31fcfaaea000e02dc3eee3a8b2a919
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / python_libnest2d-0.1.3-cp312-cp312-win_amd64.whl

Download URL python_libnest2d-0.1.3-cp312-cp312-win_amd64.whl
Size 1.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
0084e53383c215a5566703b953c4638aeade5ecb3250fd3ab44dab533b25f348
BLAKE2b-256 checksum
How to use checksums
bf9d4d128b6428d1cd2ef6f925270a74a669f831462d6b6ad5e8ac81a00fd384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / python_libnest2d-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL python_libnest2d-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f7de467b5afd5451a861747b56e2e0ec4e0f2e07f453fc1802f003e0947b0e30
BLAKE2b-256 checksum
How to use checksums
4f70ff657e7be57f000262e1002498e3cc4571c73d8c0f1dc30f26593500c27a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / python_libnest2d-0.1.3-cp311-cp311-win_amd64.whl

Download URL python_libnest2d-0.1.3-cp311-cp311-win_amd64.whl
Size 1.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
8e6c802e757cc75a4134d8160f5c2afff2f22192f7337ca90831f825d006f906
BLAKE2b-256 checksum
How to use checksums
a17fb4089649e0dead34ce4473758ad922b7889d85482b1467fe057e4a5181cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / python_libnest2d-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL python_libnest2d-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d452565ca44101e452529a35ff6ca58ac3015d3244c017eeb833f20a30d66e8c
BLAKE2b-256 checksum
How to use checksums
ae05f2bdcf8ee4bd07622db0c4d495a8669db5b67ea0b48f779964a9109ad845
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / python_libnest2d-0.1.3-cp310-cp310-win_amd64.whl

Download URL python_libnest2d-0.1.3-cp310-cp310-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
84ad58d2bde15d7ba4241897e8430b69880f222bfc3b1e34313591d124c921f8
BLAKE2b-256 checksum
How to use checksums
b0744aa63d421e6a745fe4a051e175f7477398b5ed3c9fa82818a1fe9381a63a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / python_libnest2d-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL python_libnest2d-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7e25d406302d0080e93dcda6f5937a714944bed2062f2f63b7d1ba029f0da621
BLAKE2b-256 checksum
How to use checksums
926b616287af0afc6074c6ed4d40d71d6cac44c1e9ea697360cc72db9622adc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / python_libnest2d-0.1.3-cp39-cp39-win_amd64.whl

Download URL python_libnest2d-0.1.3-cp39-cp39-win_amd64.whl
Size 1.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
49776fa7daba5821cd2b3b6fc059e5128c897876c256a55e38c7dca5f38baf6f
BLAKE2b-256 checksum
How to use checksums
9b42db3a4eed73db19d3435fc01c6c6af3b7d8872df487b37d630b613e29bc87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / python_libnest2d-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL python_libnest2d-0.1.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d4b2ddfb41cb8033c3515202ea74e73733aced6a07825e026cbf426808116510
BLAKE2b-256 checksum
How to use checksums
561e08008e6d111a0cbf5ece06baa1ff9c6265e57d4d8f7212b5c5ccb0a94e12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Security for python-libnest2d 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for python_libnest2d-0.1.3-cp313-cp313-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page