--- id: pymeshfix version: "0.18.1" license: unclear license_treatment: agpl maintenance: active --- # pymeshfix — Repair triangular meshes using MeshFix License: agpl · Maintenance: active · Downloads: 181.3K/mo ## What it is and what it does PyMeshFix is a Python wrapper around Marco Attene's MeshFix C++ library, designed to repair polygon meshes by correcting defects common in raw digitized 3D models. It removes self-intersections, degenerate elements, singularities, and fills holes to produce a single watertight triangle mesh representing a closed solid object. The package offers both low-level Cython access to the underlying algorithm and a higher-level object interface that optionally integrates with pyvista for visualization and mesh I/O. The library is intended for mesh repair workflows in 3D scanning, digitization, and geometry processing. Input is expected to represent a single closed solid; regions without defects are left unmodified. It trades off generality for robustness on its target use case—the documentation notes it may fail or produce coarse results on other mesh types like tessellated CAD models. Use it for: - Clean and repair raw 3D scans from digitization hardware before downstream processing or analysis. - Remove self-intersections and degenerate elements from polygon meshes in batch geometry pipelines. - Convert imperfect digitized mesh models into watertight solids for 3D printing or CAD workflows. - Preprocess mesh data in scientific computing or computational geometry applications. - Fill holes and repair topology in mesh datasets before feeding them to simulation or rendering engines. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyMeshFix repairs triangular meshes by removing defects like self-intersections, degenerate elements, and singularities, producing watertight output meshes from digitized 3D models. Yes, if your workflow involves repairing raw digitized meshes. The package is actively maintained, has no known vulnerabilities, and offers pre-built wheels for modern Python versions on all major platforms. AGPL licensing is a hard constraint for commercial use—you must either use it only in open-source projects or negotiate a separate commercial license with the copyright holders. For non-commercial research or open-source 3D geometry work, it is a solid, well-integrated choice. ## Install pip install pymeshfix uv add pymeshfix poetry add pymeshfix ## Installing pymeshfix Before you install: Medium install friction due to compiled C++ bindings; wheels are pre-built for Python 3.10–3.14 on macOS (Intel and ARM), Linux (x86_64 and aarch64), and Windows, so most users will have a straightforward pip install. Repository is active with recent commits. License in practice: Licensed under AGPL v3, which requires derivative works and modifications to be released under the same license if distributed. Commercial use requires a separate licensing agreement with the copyright holders (IMATI-GE / CNR). Quickstart: pip install pymeshfix import pymeshfix import numpy as np # Repair mesh from vertex and face arrays vclean, fclean = pymeshfix.clean_from_arrays(v, f) Requires numpy; optional pyvista dependency for plotting and advanced mesh operations. Verify before relying: - Whether the package handles non-digitized meshes (e.g., tessellated CAD models) reliably, given the stated design focus on raw digitized models. - Performance characteristics and typical runtime for meshes of varying complexity or size. ## Package facts - License: not declared (agpl) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 181.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mesh repair triangular, fix mesh defects, watertight mesh generation, remove mesh self-intersections, digitized mesh cleanup, polygon mesh correction, 3d mesh defect removal, mesh-repair, 3d-geometry, digitization [View on SkillFed](https://skillfed.io/packages/pymeshfix) · [View on PyPI](https://pypi.org/project/pymeshfix/)