PyMeshLab

PyMeshLab is a Python library that interfaces to MeshLab, the popular open source application for editing and processing large 3D triangle meshes. Python bindings are generated using pybind11.

Floating point precision

Unlike the default version of MeshLab, PyMeshLab is built using double precision floating point numbers, that is the default precision used in Python. This allows to avoid precision loss when importing and exporting meshes, and when applying filters to them. Therefore, some filters can behave differently from the default MeshLab version, especially those that are sensible to precision loss. To replicate the PyMeshLab behavior in MeshLab, you can use the double precision, which is available for download in the MeshLab repository with a version number having the suffix “d” (e.g. MeshLab2022.02d).

Filters renaming

Starting from version 2022.2 PyMeshLab filter names have been renamed in order to be more explanatory on the operation they perform. Old filter names have been deprecated and will be removed starting from the next version of PyMeshLab. To automatically rename the filters called in your python script, you can run the following lines:

import pymeshlab
pymeshlab.replace_pymeshlab_filter_names('/path/to/my/script.py') # replace single script

# or
pymeshlab.replace_pymeshlab_filter_names('/path/to/my/dir/') # replace all *.py and *.ipynb scripts in dir

Contents

References

https://zenodo.org/badge/DOI/10.5281/zenodo.4438750.svg

Please, when using this tool, cite:

@software{pymeshlab,
  author       = {Alessandro Muntoni and Paolo Cignoni},
  title        = {{PyMeshLab}},
  month        = jan,
  year         = 2021,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.4438750}
}