Registry / data / manifold3d

manifold3d

JSON →
library3.5.2pypypi✓ verified 23d ago

Manifold3d is a Python library providing bindings to the Manifold C++ geometry kernel (v3.4.1). It specializes in creating and operating on topologically robust, manifold triangle meshes, making it ideal for applications in CAD, 3D printing, and simulations. The library guarantees manifold output and leverages parallelization for performance. It has an active development cycle with regular releases.

pip install manifold3d
INSTALL
IMPORT
SIG · MANIFOLD3D
M
manifold3d
datapythonv3.5.2
Install
3.7s avg
Import
13ms
Disk
91MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.5.2 · 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
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.7s · import 0.008s · 89MB
91MB installed
● package 91MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

manifold3d
import manifold3d

This quickstart demonstrates creating basic 3D primitives (sphere, box) and performing common boolean operations like union and difference. It showcases the core functionality of combining and modifying manifold meshes. For saving or loading complex 3D file formats, integrating with a dedicated mesh I/O library like `trimesh` is recommended.

import manifold3d # Create a sphere with radius 1 and 60 facets sphere = manifold3d.Sphere(1, 60) # Create a cube with dimensions [1, 1, 1] box = manifold3d.Box([1, 1, 1]) # Translate the box to intersect the sphere box_translated = box.translate([0.5, 0.5, 0.5]) # Perform a boolean union operation union_result = sphere.union(box_translated) # Perform a boolean difference operation difference_result = sphere.difference(box_translated) print(f"Sphere triangles: {sphere.num_triangles()}") print(f"Union result triangles: {union_result.num_triangles()}") print(f"Difference result triangles: {difference_result.num_triangles()}") # To export, consider using the 'trimesh' library: # import trimesh # mesh_data = union_result.to_mesh() # trimesh_mesh = trimesh.Trimesh( # vertices=mesh_data.vert_properties[:, :3], # faces=mesh_data.tri_verts # ) # trimesh_mesh.export('union_result.stl')
Debug
Known issues
breakingThe `MeshIO` public API was removed in version 3.4.0. Users are advised to use external libraries like `trimesh` for Python (or `assimp` for C++) for 3D file input/output.
fix
Migrate 3D file I/O operations to `trimesh` or similar libraries. Example: `pip install trimesh` and use `trimesh.Trimesh` for imports/exports.
affects: >=3.4.0
gotchaVersion 3.4.0 introduced a 'lazy collider change' which could lead to numerical issues in some cases. This change was reverted in version 3.4.1. If experiencing unexpected numerical instability or mesh artifacts, ensure you are using v3.4.1 or later.
fix
Upgrade to `manifold3d==3.4.1` or a newer version.
affects: 3.4.0
gotchaManifold3d's rotation API takes degrees, not radians. When performing rotations, it is critical to use exact degree values (e.g., 90, 45) rather than computed approximations (e.g., `math.degrees(math.pi / 2)` or `89.999999999999`) to guarantee precision and avoid mesh cracks due to floating-point errors. The library can optimize for exact degree values.
fix
Always use integer or exact float degree values for rotations (e.g., `manifold.rotate([90, 0, 0])`) instead of converting from radians or using approximations.
affects: all
gotchaWhile Manifold3d guarantees manifold output, it requires manifold meshes as input. If you provide non-manifold mesh data, the library will return an error status. Users may need to preprocess their meshes using external repair tools to ensure they are manifold before inputting them to Manifold3d.
fix
Ensure input meshes are manifold. Consider using external mesh repair tools if starting with potentially non-manifold data.
affects: all
gotchaManifold3d's direct OBJ file I/O is limited in functionality and primarily intended for testing purposes. For robust handling of vertex properties (e.g., normals, UVs, colors) and materials, using the `trimesh` library for OBJ or other 3D format imports/exports is strongly advised.
fix
For full-featured 3D file I/O, especially with vertex properties, use `trimesh` to handle mesh loading and saving.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'manifold3d'
The `manifold3d` Python package is not installed in the current environment or is not accessible in the Python path.
fix
Install the library using pip: `pip install manifold3d`
Failed building wheel for manifold3d
During installation, `pip` attempted to compile `manifold3d` from source, but it failed due to missing C++ development tools (like Visual Studio on Windows) or required C++ libraries (e.g., TBB for parallelization) on your system.
fix
Ensure you have a C++ compiler installed (e.g., 'Desktop development with C++' workload in Visual Studio on Windows or `build-essential` on Linux). If building with parallelization enabled, ensure TBB (Intel Threading Building Blocks) development libraries are available (e.g., `libtbb-dev` on Linux). For Windows, consider building with `-DBUILD_SHARED_LIBS=OFF` if issues persist.
error status if the imported mesh isn't manifold
The `manifold3d` library guarantees manifold output but requires manifold meshes as input for most operations. If a non-manifold mesh is provided, the library will return an error status rather than attempting to process it.
fix
Pre-process your input mesh to ensure it is manifold using external mesh repair tools or libraries (e.g., `trimesh.repair.make_manifold`). For slightly non-manifold meshes, `manifold3d` offers a `merge()` function.
AttributeError: 'NoneType' object has no attribute 'dtype'
This error often occurs when a `manifold3d` operation fails to produce a valid `Manifold` or `Mesh` object, resulting in `None` being returned, and subsequent code attempts to access an attribute (like `dtype`) on that `None` object.
fix
Check the return value of `manifold3d` operations for `None` or an error status before proceeding. Ensure input parameters are valid and that the geometric operations are topologically sound, as invalid operations can lead to `None` results.
Upgrade
Version history
3.5.2latest on PyPI · released Jun 27, 2026
Audit
Dependencies
numpyrequiredRequired for array manipulations and data structures.
trimeshoptionalStrongly recommended for robust 3D file I/O (e.g., OBJ, GLB, STL) and interop with vertex properties/materials, as Manifold3d's built-in MeshIO was removed from public API in v3.4.0.
Agent activity
7 hits · last 30 days
node
6
Resources
manifold3d — pip install manifold3d · libregistry