Skip to main content

libigl: A simple C++ geometry processing library

Project description

libigl Python Bindings

PyPI version

This repository contains the source code for the python bindings for the C++ libigl library written using nanobind. Functions allow NumPy arrays as input and output for dense matrices and vectors and SciPy sparse matrices for sparse matrices.

Installation

python -m pip install libigl

Documentation

:warning: WARNING
The python-binding documentation is perennially out of date and will likely be removed/changed.
  • A tutorial on how to use the bindings can be found here
  • A function reference can be found here

Getting the current version of libigl within python code

Since version 2.5.4.dev0, the igl.__version__ attribute has been removed. To get the version of the libigl package you're using within your python code, you can use the following code:

import importlib.metadata
libigl_version = importlib.metadata.version('libigl')

The version of libigl is defined in the pyproject.toml file.

Compiling and modifying the bindiings

According to the scikit-build-core documentation, the way to make an editable (incremental) build is to:

  1. Preinstall the dependencies (at the top of pyproject.toml
  2. Then use this very long command:
CMAKE_BUILD_PARALLEL_LEVEL=10  python -m pip install --no-build-isolation --config-settings=editable.rebuild=true -Cbuild-dir=build -ve.

The CMAKE_BUILD_PARALLEL_LEVEL=10 will invoke with 10 parallel build threads.

Adding a missing binding

Bindings are fairly mechanical to write. For example, suppose we didn't have a binding for the c++ function igl::moments. The first step would be to look at the corresponding .h header file in the C++ libigl library: moments.h.

Then we would create the src/moments.cpp file in this project which uses Eigen::MatrixXN for numeric types and Eigen::MatrixXI for integer types. Typically this requires a simple wrapper around the function matching its signature to these types and some boilerplate void bind_moments(... code which adds the function to the python module.

Simply adding this .cpp file will be enough to add the bindings on the next build.

If submitting a pull request with a new binding, please also add an execution test in tests/test_all.py to ensure the binding can at least be called as expected.

Testing cibuildwheel locally

Install whichever version of Python from the official website and then run:

/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -m venv venv-official-3.11
source venv-official-3.11/bin/activate
python -m pip install cibuildwheel
CIBW_BUILD="cp311-*" python -m cibuildwheel --output-dir wheelhouse --platform macos

Downloading all the artifacts

A successful .github/workflows/wheels.yml run will a lot of .whl files. To download these all at once, you can use the following command:

mkdir wheelhouse
cd wheelhouse
gh run download [runid]

Then these can be uploaded to pypi using:

for f in wheelhouse/*/*.whl wheelhouse/*/*.tar.gz; do
    python3 -m twine upload --repository pypi "$f" || echo "Skipping failed upload: $f"
done

Acknowledgements

The original python bindings were generated and maintained by @teseoch, @KarlLeell, @fwilliams, @skoch9, and @danielepanozzo

The modern python bindings (since 2.5.4.dev0) can largely be blamed on @alecjacobson.

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

libigl-2.6.3.dev2.tar.gz (41.2 MB view details)

Uploaded Source

Built Distributions

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

libigl-2.6.3.dev2-cp312-abi3-win_amd64.whl (14.0 MB view details)

Uploaded CPython 3.12+Windows x86-64

libigl-2.6.3.dev2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

libigl-2.6.3.dev2-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (12.5 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

libigl-2.6.3.dev2-cp312-abi3-macosx_11_0_arm64.whl (11.6 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

libigl-2.6.3.dev2-cp312-abi3-macosx_10_15_x86_64.whl (12.7 MB view details)

Uploaded CPython 3.12+macOS 10.15+ x86-64

libigl-2.6.3.dev2-cp311-cp311-win_amd64.whl (14.0 MB view details)

Uploaded CPython 3.11Windows x86-64

libigl-2.6.3.dev2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

libigl-2.6.3.dev2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (12.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

libigl-2.6.3.dev2-cp311-cp311-macosx_11_0_arm64.whl (11.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

libigl-2.6.3.dev2-cp311-cp311-macosx_10_15_x86_64.whl (12.7 MB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

libigl-2.6.3.dev2-cp310-cp310-win_amd64.whl (14.0 MB view details)

Uploaded CPython 3.10Windows x86-64

libigl-2.6.3.dev2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

libigl-2.6.3.dev2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (12.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

libigl-2.6.3.dev2-cp310-cp310-macosx_11_0_arm64.whl (11.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

libigl-2.6.3.dev2-cp310-cp310-macosx_10_15_x86_64.whl (12.7 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

libigl-2.6.3.dev2-cp39-cp39-win_amd64.whl (14.0 MB view details)

Uploaded CPython 3.9Windows x86-64

libigl-2.6.3.dev2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

libigl-2.6.3.dev2-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (12.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

libigl-2.6.3.dev2-cp39-cp39-macosx_11_0_arm64.whl (11.6 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

libigl-2.6.3.dev2-cp39-cp39-macosx_10_15_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

libigl-2.6.3.dev2-cp38-cp38-win_amd64.whl (14.0 MB view details)

Uploaded CPython 3.8Windows x86-64

libigl-2.6.3.dev2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

libigl-2.6.3.dev2-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (12.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file libigl-2.6.3.dev2.tar.gz.

File metadata

  • Download URL: libigl-2.6.3.dev2.tar.gz
  • Upload date:
  • Size: 41.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for libigl-2.6.3.dev2.tar.gz
Algorithm Hash digest
SHA256 b443e4335ba0aba54b27e69af0fe63b48f73fea36c69ef0ce889add0ce7c5333
MD5 c8093b7219ff9d2b660356f1e418a91c
BLAKE2b-256 2758aa4909d6c7e75637b06f06a4c28c9664f7158f5b3e20eba463954071692d

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: libigl-2.6.3.dev2-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 14.0 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for libigl-2.6.3.dev2-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d22df0ed72b69920ddd86b47103bb94361c4b0c51932977b3511eb28cf14b3b9
MD5 0a1209bba3ff07829b93215611adc3a2
BLAKE2b-256 a26913c58883c76641755824c25c1553a80014a98aa26908ab53aadcd67261f0

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4f9de1f82366815fccfa70e2cae43b978ebc6dd34a21d0842d017b9ce02f62a3
MD5 21f65f504bc965c2036896ab01f7da53
BLAKE2b-256 0f5c638244b3ebd2756063df5f06693ceae3c87ee3d556be0a76b3968d938d3c

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4c4555b5eb63a14e9a2086898bd21b84092f1ad4c952d2385b3bcce53ad81fef
MD5 28ae10344467f4f24584d29f8a583439
BLAKE2b-256 f3e224d2cbb582935382e257269060d55be47c6684b8196d954e2510e3993160

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 00a02164ef79323d13f40d496323b6df8f945b432401940c2236c19f70dd2c38
MD5 83b563082b8094292235aa8d47854736
BLAKE2b-256 a2612b353d337b820f594276fc7a94e18499fa86102ef77c79072e080fc58e30

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp312-abi3-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp312-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 26dd00e57f9cd97c1f55c53daae2e3ee7c60a73d5aa4c405b744e3668b9f9b8a
MD5 e49253bfd19872fa592ff2b517efcf3c
BLAKE2b-256 050a8f6a32cbe18015c0f53a3eae09aed7e0b8512127ebbed56b12400593e3cb

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 49c49599dcbdc8eb35400cf048bb3041585f321877464512c46d915417bbcb06
MD5 5fe4d0393b1d4ff7f4c5a1beaac53b8d
BLAKE2b-256 0ac691219a89750892b5c642d25fd9962c9283c5498f8fef44fa8bc6154b26c6

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 89afbbcfd9a30b05513fa2bf61b45f925d63d65f874fd7029e574f84db047d94
MD5 c061a825c50e8eb0cce7098169c0e82e
BLAKE2b-256 fb9674acfd5e8af98a16278128bdc7e69a7c086721af14ef55181d040e08199d

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3271eb004a2d094fd97a0f4290f2ad53f522f14b8e24d0eeff6ad0153076762c
MD5 3e30a2232dbd0704ee92ab433e13f795
BLAKE2b-256 1b9b143112d80be38db09b6b78e45525f1e1ce22c520aac54111f005550b29e8

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d2e4fea6ce896faeac0844b0899306bb17c4851a99bb714bc912757ec769d3ae
MD5 7e8ad14beedffe0e368801d72cd55f0a
BLAKE2b-256 2756b53891e18297069ed41d0b5da0f264fea641837a15477b13e2afacc615ed

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7d8631cbfb24812757afed9eb3649cfe4b0c69f17622e65b47a696876870b543
MD5 4284cba3bdad2d8fd6d501e7504d5ce2
BLAKE2b-256 776176947e76efa56d25b60d834c4abfa3a942098bc11b16e788c2387285612b

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9ba26256656f814d103c5180c7b3abe14d9db913b9525cbb6d54e1c28dfe1991
MD5 3877c1f426184cdde967f73885307a9d
BLAKE2b-256 eefa563f4f43ffd1625106af511f65b067e5d7a07e1140540f168b78d4d6c141

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1b822fff1df2de63ec4db1cbf9d05dbfb161d89f51fa76a86483b66f1c0b2763
MD5 c2b5ad66c3214360b124f19b1befdc89
BLAKE2b-256 3cf3b58208672e448f4c03576940b8906e2383472d8fb57a2854f7545fdd07e8

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e4bdd9a4baa61af6918b675593cf724e027dbb8c858df355a4715cea695bcff6
MD5 092dd453e4730b99d728a80710a81d07
BLAKE2b-256 63b4930af7e2a5dc8ccfb5cdb7b7745438432e5b79257e025646418ac3254362

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 831135c394fe753844ed7d31f5e4033a83942140f5ab3cfdfff2198255ce4d1d
MD5 933c92d0e1a30cb62ec8d1987659ab27
BLAKE2b-256 ec8c05f56ea2bc0e102424f992673950ea0bc3eb99a68528b8ab3370c237f75b

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f7e06c5680cb93707f5cd4859ed659cb6ec88387204505631b26218ee5d10975
MD5 a69b721ac42c9a17ac604bcc678ae677
BLAKE2b-256 ff9eea3b0624dc8ed0e57c18970b3f2652902145258d4a6bbd9c9a1d5983d8e3

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: libigl-2.6.3.dev2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 14.0 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for libigl-2.6.3.dev2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f9777a8aeba0edc5efa9a66541fc3b009162ef76b0a155b05c7672a96654c38e
MD5 d058e4f954d0f0726daacc7048dc44b7
BLAKE2b-256 420edf6f0eeb784b7a40b596665a16cde4bb80f81bf0181cd459cd0ec7653740

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7db207628407dd8432726952d379a7b14dfcdb2e9b2b058b06ff31baebfdd33a
MD5 7bed855f85a3868f52cf626c45f2641b
BLAKE2b-256 e96b50274c843e51455fd9c16860dca9dc02bfa425b0db304a4ad7d45101eea4

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5edca1e4b866aefc9749e222e82cd7670f6eb977636694079856a1064cfea402
MD5 7a8e71150f35b64060f8f097e45c16dc
BLAKE2b-256 30f7b92d63243e61a0ec714f55ea7cecb0c0f68ecde7f687cd906e8d816a2b86

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3f404146ec081b495702518b826a72d1c9fb1b84e68d017cc5503b4a3b13cab8
MD5 a8526b832b8d0a05c44d22fb3f74b5ac
BLAKE2b-256 71c2d2d1ba4e8959a0b8ef8b97aaa88f9acbe6512dea0dba737439d6e4245349

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f0453954a98bc63ee2a87f9160aa7e8eabe14221d380f3fe36a442ad9d642105
MD5 37667a6089bc4e54de8de7fd8e40b240
BLAKE2b-256 cda6e2d241f5a27cab6895b5de547a447f60a43cb08c6ac601eef3db2a7898a3

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: libigl-2.6.3.dev2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 14.0 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for libigl-2.6.3.dev2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 36fba37765ac20846a53f898733b563f964754425f38e659e96e495248a20700
MD5 67cd77dc3e3e04c9d2fd55e9e3e46f7a
BLAKE2b-256 a680c16da166a8ddeae43408d6bff96a32a4cb83cca33b76bd8c70e3c4b48228

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eee6d4f4794df90bec96ebafc0708f7fa13e0afd59f3ace098a418066c70f551
MD5 723e9a718b7544de0bee5efb19e678cb
BLAKE2b-256 c99d3b338c9721decadbd147cd3327b0ceaa7cb5f248f7cc8131154704a92962

See more details on using hashes here.

File details

Details for the file libigl-2.6.3.dev2-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for libigl-2.6.3.dev2-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 562ed653b6b16bce12594bcb48944ab6828779d7c7485970384b47f178392619
MD5 8f62824e2ae041ca3fa1ab7bc86acae2
BLAKE2b-256 2421cfb9fabfe53bb955532c3fe20f21481cb45c384982b0fc14a4dbfe42bffd

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