libigl Python bindings¶
Python bindings for libigl — a simple C++ geometry
processing library. The bindings are NumPy-native: meshes are plain arrays
(V an #V by 3 float array of vertices, F an #F by 3 int array of faces),
and every function returns NumPy arrays or SciPy sparse matrices.
import igl
import numpy as np
V, F = igl.read_triangle_mesh("bunny.obj")
L = igl.cotmatrix(V, F) # sparse cotangent Laplacian
N = igl.per_vertex_normals(V, F) # per-vertex normals
K = igl.gaussian_curvature(V, F) # discrete Gaussian curvature
Where to go next¶
- API Reference — every bound function and class, grouped by module, generated directly from the installed package. Functions that also exist in C++ link straight to the C++ Doxygen reference.
- Installation — pip, optional modules, and building from source.
Modules¶
The core functionality lives in igl. Additional functionality that depends on
third-party libraries is grouped into submodules:
| Module | Contents |
|---|---|
igl |
core geometry processing (Laplacians, curvature, distances, parametrization, deformation, …) |
igl.predicates |
exact geometric predicates (orientation, incircle, winding numbers) |
igl.cycodebase |
cubic Bézier / spline distance and root-finding |
igl.copyleft, igl.copyleft.cgal, igl.copyleft.tetgen |
GPL-licensed functionality (booleans, meshing) |
igl.embree |
Embree-accelerated ray casting and ambient occlusion |
igl.triangle |
Triangle-based 2D meshing |
igl.spectra |
Spectra-based sparse eigensolves |
Note
These bindings are under active development. If a function you need is missing, please open an issue.