Skip to main content

Deterministic, embeddable, true-shape 2D nesting engine for irregular parts

Project description

ironnest

Deterministic, embeddable, true-shape 2D nesting engine for irregular parts — a Rust core (a jagua-rs fork at f64) exposed to Python via PyO3.

The differentiator is determinism: the same inputs produce byte-identical placements on every platform (macOS-arm64 / Windows-x64 / linux-x64), proven by a cross-platform CI golden — so a re-nest reproduces a byte-identical downstream cut program for a machine audit trail.

Install

pip install ironnest

One abi3 wheel per platform (macOS-arm64 / Windows-x64 / linux-x64) serves CPython 3.13+.

Usage

import ironnest

# one outline per part type, in item-local coords
items = [[(0.0, 0.0), (10.0, 0.0), (10.0, 10.0), (0.0, 10.0)]]
container = [(0.0, 0.0), (100.0, 0.0), (100.0, 100.0), (0.0, 100.0)]

placements, unplaced = ironnest.nest(
    items,
    qty=[25],
    container=container,
    holes=[],                        # interior keep-out zones ([] = none)
    min_sep=0.0,                     # 0.0 keeps output byte-identical across platforms
    rotations=[0.0, 90.0, 180.0, 270.0],
    seed=1,                          # explicit — no entropy fallback, ever
    budget=2000,                     # a fixed sample budget, never a wall clock
)
# placements: list[(item, x, y, rotation_deg)] with placed = Rot(rotation_deg)·original + (x, y)
# unplaced:   list[int] (item-type index per instance that did not fit)

holes are interior keep-out polygons on the sheet (nesting around voids / inside parts). To pack across several sheets in order, use nest_multi(items, qty, sheets, min_sep, rotations, seed, budget) where each sheet is an (outline, holes) pair.

The engine is a pure placement oracle: it knows nothing about kerf, lead-ins, pierces, cut sequencing, or G-code — those belong to the consuming CAD/CAM application, which re-validates every layout. See the project repository for the full design.

Licensed under MPL-2.0.

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

ironnest-0.4.0.tar.gz (151.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ironnest-0.4.0-cp313-abi3-win_amd64.whl (335.5 kB view details)

Uploaded CPython 3.13+Windows x86-64

ironnest-0.4.0-cp313-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (471.3 kB view details)

Uploaded CPython 3.13+manylinux: glibc 2.17+ x86-64

ironnest-0.4.0-cp313-abi3-macosx_11_0_arm64.whl (423.6 kB view details)

Uploaded CPython 3.13+macOS 11.0+ ARM64

File details

Details for the file ironnest-0.4.0.tar.gz.

File metadata

  • Download URL: ironnest-0.4.0.tar.gz
  • Upload date:
  • Size: 151.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ironnest-0.4.0.tar.gz
Algorithm Hash digest
SHA256 312de27d02543604c98ecb3e37467038fa81e5690df52d8e18933a7a0ad86219
MD5 561221101f00cda17c1e0b078e89fdcd
BLAKE2b-256 314e5894ac6ab896da2c737f9a18e5c27e363e7dfa6870dc09edad5c4509f9f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ironnest-0.4.0.tar.gz:

Publisher: wheels.yml on TexasCoding/ironnest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ironnest-0.4.0-cp313-abi3-win_amd64.whl.

File metadata

  • Download URL: ironnest-0.4.0-cp313-abi3-win_amd64.whl
  • Upload date:
  • Size: 335.5 kB
  • Tags: CPython 3.13+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ironnest-0.4.0-cp313-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b8764696d3e50b65bce28552459a792b4096b4e137563ffbe6152e6ef79312f1
MD5 d0790f0b7b3772b5b8651c666c00badc
BLAKE2b-256 e6d48acc5c60c030a1d9ae8bf15f641f1d2b2761a8345cb9ed7c62d133241fd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ironnest-0.4.0-cp313-abi3-win_amd64.whl:

Publisher: wheels.yml on TexasCoding/ironnest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ironnest-0.4.0-cp313-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ironnest-0.4.0-cp313-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4d29e9e4c9c5999fc1886ab2954c783e325786e0bafde6d460927a81300788b9
MD5 142f48eefb3c862f4b78b0492260d2e9
BLAKE2b-256 746914d7d41fdf0d518210d8ef469e3c83dd0a15d94c3a949c0ae3f7b01a7914

See more details on using hashes here.

Provenance

The following attestation bundles were made for ironnest-0.4.0-cp313-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on TexasCoding/ironnest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ironnest-0.4.0-cp313-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ironnest-0.4.0-cp313-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b672a66ec12145cca44546ff03a91b04c1c46ecfeae992fc9fd84cf766835fb0
MD5 0660f6d5791258b2ad5da4754ae4420c
BLAKE2b-256 c124711e8dab3464ea9126086c5ea1f54e53c5b014127ffb5c3d55f0a25d54dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ironnest-0.4.0-cp313-abi3-macosx_11_0_arm64.whl:

Publisher: wheels.yml on TexasCoding/ironnest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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