libigl: A simple C++ geometry processing library
Project description
libigl Python Bindings
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. |
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:
- Preinstall the dependencies (at the top of pyproject.toml
- 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:
python -m twine upload --repository testpypi wheelhouse/*/*.whl wheelhouse/*/*.tar.gz
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
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 Distribution
Built Distributions
File details
Details for the file libigl-2.6.1.tar.gz
.
File metadata
- Download URL: libigl-2.6.1.tar.gz
- Upload date:
- Size: 41.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2d2694ac28b4b6f0f9d00ee6135d3db914bd1233f393c316293289da462eb996
|
|
MD5 |
e07a1093dc97f6622fa10e314139802b
|
|
BLAKE2b-256 |
9d2627a679e6ed3926333a8128b7535da189567885a2852ab1a28e794d3305a0
|
File details
Details for the file libigl-2.6.1-cp312-abi3-win_amd64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp312-abi3-win_amd64.whl
- Upload date:
- Size: 13.5 MB
- Tags: CPython 3.12+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9d0516ab8d90b2889e7274b91eb518ec66ec5d7c0bbbbd0be7da0345b682214e
|
|
MD5 |
5d4f3f3591a68aa10c776c24978dd90d
|
|
BLAKE2b-256 |
978b77405e7076e218351a14c1561f2a324b499df8dd3711a517e5d082ed1c77
|
File details
Details for the file libigl-2.6.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.4 MB
- Tags: CPython 3.12+, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
8fd48f867663df7fd052444c10eb1fa1c303acc86e4016067972b4aab0ae4588
|
|
MD5 |
5ea54dd9286415e30adba239dea21f70
|
|
BLAKE2b-256 |
9c5cbc7aec8d3a93ce700dd6644c771a22fe6aff00379f7c97073f65a29270e8
|
File details
Details for the file libigl-2.6.1-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.12+, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
279db1c84cd957ff29ab1defd794383f68bdb5f49f893a06bf90c68f30a271a7
|
|
MD5 |
ab25bfdb7d1ab675eba5909d95890871
|
|
BLAKE2b-256 |
8948592e3e62590a852e9819f3bba86ed7f353495cc4440233dd1ddfad2dd66f
|
File details
Details for the file libigl-2.6.1-cp312-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp312-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.12+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
90e60d769d885d0e64c66ff9cd293c112a0de8ede28840ed1c5bc522680f51ef
|
|
MD5 |
b325710ec81dd3327ef32282990627ec
|
|
BLAKE2b-256 |
296fdd012c6a8bbe81db49c356f09b221aa684b32c4bb17257a99a43391c58d4
|
File details
Details for the file libigl-2.6.1-cp312-abi3-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp312-abi3-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.12+, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d6f6df46a8534996cc4b641047e94a5c4107b957612e2b29f0fceb43e3a69c7a
|
|
MD5 |
35cfd424f8e7154153ccbd525951a4bb
|
|
BLAKE2b-256 |
fbbbbc16b51a17ee4ff9e3112a7235b16ed29205fb0b7c08574d68360b64e17a
|
File details
Details for the file libigl-2.6.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 13.5 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
1e3dc3cdbbce5c700a7f804173af42a62ca55e3690d5054edb7b4102a6e22ceb
|
|
MD5 |
f96df494de275eb658bd0faa1cdcfbde
|
|
BLAKE2b-256 |
b29947a3b80f0d56ffe7436fd13c2aec5f34d9d320756049c9f57e053f8268f0
|
File details
Details for the file libigl-2.6.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
25697bfbea20957d9b7ae9abff95a560297b33bf92ba255b8a8f1b8990c0fcbb
|
|
MD5 |
966447e1cd444f8f4d348a6331bcd3ca
|
|
BLAKE2b-256 |
d8414efcb97254fd57e572ba7f419108968663a872ca6f1c584b7f012da0d3bd
|
File details
Details for the file libigl-2.6.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 13.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b3020b6bba54d75d5dae7fd4429223fe1969097a5ac5d05440c6130fdadebbc3
|
|
MD5 |
3e16f5938615927f1065e758c63a5872
|
|
BLAKE2b-256 |
61cf9d4ab83b1ce21388e562fa40e7a983e0c08d9951536f57c6a9458e94a22a
|
File details
Details for the file libigl-2.6.1-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
65bbb69b333491a4200789f4a04e4b562a8455bc5ed96b759de154cf7b226633
|
|
MD5 |
1b2dee8251ecfa10740df28b14b4a480
|
|
BLAKE2b-256 |
ccf137b1a945013741b8cafe1b5ece19dd81b1fb910fb9b3d02d69b5b3b367da
|
File details
Details for the file libigl-2.6.1-cp311-cp311-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp311-cp311-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.11, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
fec058d19838e8d2824f5aabe649c05cc123a8480f3ca4643d991632ee1295f7
|
|
MD5 |
b028e730ff93f1e732037d076eb569d1
|
|
BLAKE2b-256 |
a0bc70a1e2d51af72feae4f0933fe90dafbbd9ed9d99cec599de63201d329f03
|
File details
Details for the file libigl-2.6.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 13.5 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7d20ae9c0f3b324787534fc01af72dcb4bb9285da2fcf937c0caf951e742dab7
|
|
MD5 |
d4889764a23753a175ac178adeab54dc
|
|
BLAKE2b-256 |
33111e9b263fd0fa687adb6bb95809955d000c7c322035c17c23cfe6d3899695
|
File details
Details for the file libigl-2.6.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
411a79dcab26764e6ab84c33d4d3b24e1e94ed5018dde8f1beb2fb7313003ea4
|
|
MD5 |
a326bf5fc2d3db33fa9a5ce2195827f9
|
|
BLAKE2b-256 |
47271af74100201fa299d24a22b137924b9052742eb3bf65df3b894aef2f04ad
|
File details
Details for the file libigl-2.6.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 13.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
30d273ae723f3bd74dde961d2ee89b3f52591c0b711ba0911224873daf356bd9
|
|
MD5 |
c3f4ceedbed05861a70f63e79571a235
|
|
BLAKE2b-256 |
f18f07d58b038208e19a0d633176ccf05ec7651937644b3c52c2acddce17401f
|
File details
Details for the file libigl-2.6.1-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d6484317fce9da8451301b24cbb71149e2f93affe2da8515f7391eb198ad9146
|
|
MD5 |
8313783be4743e9d2edff241f5121c89
|
|
BLAKE2b-256 |
2708c66609a05876368cfd741cb2a1cb786a79eb2f1ad1b93654edf6092421a2
|
File details
Details for the file libigl-2.6.1-cp310-cp310-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp310-cp310-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.10, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9b3c4920b065c984ba0b803924d43e4009ecdd756ec9f2f0d43ad8113a2f85aa
|
|
MD5 |
6edf4af135987c4a0e931a81bf24058e
|
|
BLAKE2b-256 |
acaf1c68fcfd4a66cbfb29a307327a219203066522010353f924ae3036f108b2
|
File details
Details for the file libigl-2.6.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 13.5 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d944b806edb21e8d9b339966afedab17d78e6b364d0bd6fd091cbd66f190fc74
|
|
MD5 |
20c471c7cfb9e704448dfc7d23a8658d
|
|
BLAKE2b-256 |
3ad14657c12e65e011f5e89e9fa33e85ddeb066cbe192c2bb3ccb57c3e5b2858
|
File details
Details for the file libigl-2.6.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2090a439d0c6363fe1213cf64fee7d29a8bca22f6fa60d2a3dd8388654b800ce
|
|
MD5 |
e38be7b5ca1a9390b891df5b5065f9c5
|
|
BLAKE2b-256 |
152c235d80ec7462cf1c902bbec7420fe1f21ea845acb9f3f519aa8cba6d02de
|
File details
Details for the file libigl-2.6.1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 13.0 MB
- Tags: CPython 3.9, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4572c9beeb9c900d54b6b4c389fd0af0f010daf2c2b58f3d304dcedfbc17e406
|
|
MD5 |
7d63575640dff0c626507b9493d23a16
|
|
BLAKE2b-256 |
ab0c5500cd4c9d3ec93186fbca9804a16bfb9c6e081f3968873164cbc860b372
|
File details
Details for the file libigl-2.6.1-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
278a57131c0205950befee54b9732415ebbc9c8203f55562730d6de8e9df1632
|
|
MD5 |
10628e810e914b49415eba422d28fe5f
|
|
BLAKE2b-256 |
0582ed297a18caa5cc5d557dab1680aa9c0a081617bc4a52f8a3f334af4bcef6
|
File details
Details for the file libigl-2.6.1-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e1be8e277d5f1722ffd2c89c60569486140147c49ef480a161545b7cd2d55922
|
|
MD5 |
48ab8973965ef804197dbdb9567e2da4
|
|
BLAKE2b-256 |
530379dcbb1d841e75579826185f6a62085847369f288d67608a07fb5e01994b
|
File details
Details for the file libigl-2.6.1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 13.5 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
dc4f6a094429f3ceaa4df2b73b3fbbc450f8886de1f9df7872db032fbe3c28f7
|
|
MD5 |
f85dffa80f73027241ad254c6432940e
|
|
BLAKE2b-256 |
ccccd6d4cb02aaa946129a18f4640cca122e6a7deab8767b563b58a400433da8
|
File details
Details for the file libigl-2.6.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.4 MB
- Tags: CPython 3.8, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2db5941e0e972af5638f7dfc13ea0e3ebbd6e8c49d6b1c982838c179e8f9b32d
|
|
MD5 |
29b7316b13d421378bcbf123ad5c6e06
|
|
BLAKE2b-256 |
fc6bda5599106bb46bf3f6751068b217939f97f6128065ea2d6ae75facb75e07
|
File details
Details for the file libigl-2.6.1-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: libigl-2.6.1-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 13.0 MB
- Tags: CPython 3.8, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
033038ffbab95a986c213188d020ce57b094deff8288cca776866b93de23577e
|
|
MD5 |
564c873620b6226e7c671cd6876bfb52
|
|
BLAKE2b-256 |
66cd9794c0efce5e0e0a7301a54497517b52ce894b35ab59d36cad8138abeaa0
|