Skip to main content

A Pythonic binding for the PicoGK computational-geometry kernel

Project description

PicoPie

A Pythonic binding for PicoGK — LEAP 71's compact computational-geometry kernel for engineering (voxel / level-set modeling on OpenVDB).

PicoPie binds the same native runtime the official C# library uses — so you get identical geometry and performance — then wraps it in an idiomatic, NumPy-friendly Python API. No .NET, no compiler, no system libraries: just pip install picopie.

import picogk
from picogk import Voxels

picogk.init(voxel_size_mm=0.2)

body = Voxels.sphere(radius=10)
hole = Voxels.sphere(center=(6, 0, 0), radius=6)
part = body - hole          # boolean subtract → new Voxels
part.shell_(1.0)            # hollow to a 1 mm wall (in place)

vol, bbox = part.calculate_properties()
print(f"{vol:.1f} mm³")
part.to_mesh().save_stl("part.stl")

Install

pip install picopie            # core
pip install "picopie[viz]"     # + headless slice/mesh PNG helpers (Pillow, matplotlib)

or with uv:

uv add picopie

Wheels are self-contained — the native runtime (OpenVDB 13, PicoGK 26.2) and all its C++ deps are bundled. Prebuilt for CPython 3.10–3.13 on Linux (manylinux x86-64), macOS (Apple Silicon), and Windows (x64).

Documentation

Features

  • Voxels — primitives (sphere, capsule), booleans (+ - &), offsets, shell_ (hollow), implicit SDF modeling, and queries (is_inside, closest_point, surface_normal, ray_cast, calculate_properties).
  • Mesh — from voxels (marching cubes), NumPy vertices/triangles, STL/OBJ import and export.
  • Lattice (beams + spheres), ScalarField / VectorField (bulk set_many/get_many), Metadata, PolyLine.
  • File I/Osave_vdb / load_vdb round-trips voxels + fields (OpenVDB).
  • Headless viz ([viz]) — save_slice_png, save_slice_sheet, mesh_preview.
  • Interactive viewerpicogk.show(part) (GLFW/OpenGL, orbit camera) and render_png(part, "out.png") for offscreen renders.
  • Fast path — a compiled _fastloop extension (~13–28× faster bulk mesh/field transfer) with automatic pure-Python fallback.

Reliability

PicoPie is validated against the reference and hardened well beyond a naive binding:

  • Parity-tested vs C# PicoGK on the same runtime — volumes, dims, mesh counts/bbox, and geometric queries match to float precision.
  • Never aborts — the native runtime is patched so a C++/OpenVDB error surfaces as a catchable PicoGKError instead of killing the process; non-finite inputs are rejected up front. Verified against thousands of fuzzed inputs.
  • Reproducible & auditable — every upstream dependency is version-pinned; builds ship an SBOM (sbom.cdx.json) and hash-pinned build deps.
  • Green CI across Linux/macOS/Windows; mypy + ruff clean; ~190 tests.

Development

git clone https://github.com/Borderliner/PicoPie && cd PicoPie
python -m venv .venv && source .venv/bin/activate
scripts/build_runtime.sh         # build + stage the native runtime (see below)
pip install -e ".[dev]"
pytest

Building the native runtime (Linux) needs system deps:

sudo apt-get install -y --no-install-recommends \
  libboost-all-dev libblosc-dev libtbb-dev extra-cmake-modules \
  xorg-dev mesa-common-dev libgl1-mesa-dev ninja-build cmake g++ git
scripts/build_runtime.sh

PicoPie locates the runtime automatically: bundled in the wheel (picogk/_lib/), else under native/, else via $PICOGK_RUNTIME (full path to the shared library). Cross-platform wheels are built by cibuildwheel in .github/workflows/wheels.yml.

See ROADMAP.md for the (now-complete) phase history and PLAN.md for the architecture rationale.

License

Apache-2.0, matching upstream PicoGK / PicoGKRuntime. Ported by Mohammadreza Hajianpour and Vish Vadlamani.

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

picopie-0.2.1.tar.gz (980.8 kB view details)

Uploaded Source

Built Distributions

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

picopie-0.2.1-cp313-cp313-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.13Windows x86-64

picopie-0.2.1-cp313-cp313-manylinux_2_34_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

picopie-0.2.1-cp313-cp313-macosx_14_0_arm64.whl (20.0 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

picopie-0.2.1-cp312-cp312-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.12Windows x86-64

picopie-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

picopie-0.2.1-cp312-cp312-macosx_14_0_arm64.whl (20.0 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

picopie-0.2.1-cp311-cp311-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.11Windows x86-64

picopie-0.2.1-cp311-cp311-manylinux_2_34_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

picopie-0.2.1-cp311-cp311-macosx_14_0_arm64.whl (20.0 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

picopie-0.2.1-cp310-cp310-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.10Windows x86-64

picopie-0.2.1-cp310-cp310-manylinux_2_34_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

picopie-0.2.1-cp310-cp310-macosx_14_0_arm64.whl (20.0 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file picopie-0.2.1.tar.gz.

File metadata

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

File hashes

Hashes for picopie-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0f451e0b77bbd490bf4607b4c48a22cd4ad2d13456ced19142da002ddc64815e
MD5 43342315fdf103a0fc1e93a3706f209c
BLAKE2b-256 5cc2116e3e9c51a4709424a3ce058290304d3ab5a3a38fc46df5888f252d8098

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1.tar.gz:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: picopie-0.2.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • 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 picopie-0.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5fdc0d181f204b5cb3fb72a618a2c3d3928d1ad7a7e8e039141176695dd6eee9
MD5 fdd725ad3d0a40176bc692733b4ae673
BLAKE2b-256 1b3f9e4d690acdae57b09783baa86c054b128422ea913b5e9e6c3a6eabe1fad6

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for picopie-0.2.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f515110ec893b49fcdcb0fe100f9906e502203e111cb80228f2a7566fb98601a
MD5 071868c152d8e75777fa57c451531223
BLAKE2b-256 cf015d64b3e17f90a92d61396aa43aab407084c77cd614ca9eb0ac28b73eb636

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for picopie-0.2.1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d88d283a98df3bead278de3a6cbca14be4d1158d2aab141fcf22bc1f6d4fe5b5
MD5 e0d384cdb0a7d8ef212957b6a4d51d09
BLAKE2b-256 b38135c9df73ac86e6f7ea9835d6a1b8f6234b81a3d8df714c10242076b221e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: picopie-0.2.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for picopie-0.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5809203539fd956bb5a7d26fd4e8d920d928c5d181dc9d8e62dce4d405ce70fa
MD5 95ef39732b26f5ae03c0fe9d93f8bbf7
BLAKE2b-256 c242667076c063a94d0ff8026c0423b06725c562f9f8f5510b728ad0daa0db5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for picopie-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d2488019cfea830b7e2068c5eeb2084427e1ed33ca4843c663b78aec4adf96c1
MD5 74c71dad722e0ab55e704b719e77201b
BLAKE2b-256 9ebfd77f8eff8347633516f8fbb29de7da24d4c89dd5b87c06edf523ca7484b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for picopie-0.2.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 bf68e2ef109ff24cbbea58c06b39bcb7c01138ccacb0178c275a5b2c4a6bc3b2
MD5 7f32726ad84663d6a378502afd1007cd
BLAKE2b-256 f73022880d1370c554aeacb87792a7cc53d9e9b1648b14540f7468e34f06e271

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: picopie-0.2.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for picopie-0.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f127557bf7b24593b0d99a61d4b9a9ed57f8b03e36a5401daf25df3193f4936a
MD5 905c5cf1dab08cc26145c70b35db6cb7
BLAKE2b-256 9aee4fd94d8b4841d700b25ef8311db612cb483e5343500d30b5d5d920f8cc96

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for picopie-0.2.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8cc3bf0996926803c0087c5e7e2ce4d58d0976b904318458bdab6022eef7b367
MD5 b7d0e7be48341c15725b46cce100ac1b
BLAKE2b-256 0275769ae2ff1da6f0e04db8bf4512a428ab3dbf00429856d2e65a10e305deb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for picopie-0.2.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2dc89d26f5e61542627489e9c489dbae56d0b19a5ffc6bb3daea74f0e7e7cbee
MD5 65d3d101c0227c3ec65770130fd54661
BLAKE2b-256 471c33597094607f3d7a2810bfa231d57c822e4c85ce07c198d190e193c96d00

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: picopie-0.2.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for picopie-0.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cc20471424dcd130cc8a4d8d40575460889a7b5f9dabe236a292701820db6a0c
MD5 0d716126d43caa073f0a9cc9cfb5e3b5
BLAKE2b-256 3b1a01295d25b55a60b4d46dbb55a84f69cf002db60c32434df634f32a24f583

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for picopie-0.2.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bce753214644cab756f0ec7304d0cbb1f33c71b3b3cc133241c23571229aab55
MD5 2efaf1d3c631513a709bb0f611df8ecb
BLAKE2b-256 da82aa89a7859c2d23e81d57f8712ca5159677d131219c60d0e91e815f15f7b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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

File details

Details for the file picopie-0.2.1-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for picopie-0.2.1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a8eca0c9dfa2a7356cbcd9455cab9e6d6fd4592635982c756db927abe1a60272
MD5 7375cde94409ae607bcae5087c1f70c5
BLAKE2b-256 9853960d4c117da61f8bf7c110b1005d4a80f1ce7b9fecb4f6d3fb72d854ce1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for picopie-0.2.1-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: wheels.yml on Borderliner/PicoPie

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