Install & Compatibility
Where this runs
tested against v0.1.13 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✓ 3.63s
py 3.11
✕ build_error
✓ 3.5s
py 3.12
✕ build_error
✓ 3.38s
py 3.13
✕ build_error
✓ 3.45s
py 3.9
✕ build_error
✕ build_error
90MB installed
● package 90MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
simplify
✓ from fast_simplification import simplify
✗ import fast_simplification
simplify_mesh
✓ from fast_simplification import simplify_mesh
✗ import fast_simplification
replay
✓ from fast_simplification import replay
✗ import fast_simplification
This quickstart demonstrates how to simplify a mesh using NumPy arrays for points and faces. The `simplify` function returns the new points and faces of the decimated mesh.
import numpy as np
import fast_simplification
# Example mesh data (a simple tetrahedron)
points = np.array([
[0.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 0.0, 1.0]
], dtype=np.float64)
# Faces: connectivity of points, typically flattened for PyVista/VTK style
# Each face is defined by its number of vertices (e.g., 3 for a triangle) followed by vertex indices.
faces = np.array([
3, 0, 1, 2,
3, 0, 1, 3,
3, 0, 2, 3,
3, 1, 2, 3
], dtype=np.int64)
# Perform simplification, e.g., reduce to 50% of original faces
reduction_factor = 0.5
points_simplified, faces_simplified = fast_simplification.simplify(
points,
faces,
reduction_factor
)
print(f"Original points: {len(points)}, Original faces: {len(faces) // 4}") # //4 because each face is 3 indices + 1 count
print(f"Simplified points: {len(points_simplified)}, Simplified faces: {len(faces_simplified) // 4}")
Debug
Known issues
gotchaPotential NumPy version conflicts due to compiled extensions. While version 0.1.8 added support for NumPy v2, and 0.1.11 allowed NumPy <2.0, users might still encounter issues if other installed packages have strict NumPy version pins or if an older `fast-simplification` wheel was compiled against a different NumPy major version.fixEnsure `numpy` is updated to a compatible version (e.g., `numpy>=2.0.0` with `fast-simplification>=0.1.8`) or pinned (e.g., `numpy<2.0.0`) if other dependencies require it, and try reinstalling `fast-simplification` to ensure wheel compatibility.
affects: <0.1.8, potentially 0.1.8-0.1.10
gotchaThe `simplify` function expects face arrays in a specific 'VTK-like' format where each face definition is prefixed by the number of vertices it contains (e.g., `[3, v1, v2, v3, 3, v4, v5, v6, ...]` for triangles). Incorrectly formatted face arrays will lead to errors.fixEnsure your face array correctly represents the mesh topology. For triangular meshes, this means an array where every fourth element is '3' followed by three vertex indices. Refer to PyVista documentation for common mesh array formats if converting from other libraries.
affects: All versions
deprecatedThe behavior of `fast_simplification.simplify` regarding `return_collapses` and subsequent `replay_simplification` changed with v0.1.3 and was further documented. While not strictly a breaking change, older assumptions about how to capture and replay decimation might need review.fixFor replay functionality, ensure you set `return_collapses=True` in `simplify` to get the necessary `collapses` data, then pass this directly to `replay_simplification`. Check the latest documentation for usage.
affects: <0.1.3
Upgrade
Version history
0.1.13latest on PyPI · released Dec 19, 2025
Audit
Dependencies
numpyrequiredRequired for array input/output and internal data structures.
pyvistaoptionalRecommended for advanced usage and direct integration with 3D visualization, though not strictly required for core simplification functionality.