3D Mesh Tools

March 2025

Here I share three mesh tools that saved me a lot of time in the past. They are made with Pyvista.

mesh_landmarking Github

Allows you to place landmarks (i.e. 3D surface points) on a given mesh. These landmarks can be either be saved in absolute 3D coordinates or in barycentric coordinates (i.e by a triangle index and a parametrization of its vertices). 3D Landmarks are widely used to build semantic correspondences between shapes of a same class (e.g faces) which is a mandatory step for rigging, animation or statistical analysis.



mesh_masking Github

This tool lets you select a set of vertices in a mesh and save this selection (often called a mask). The selection can either be saved as in boolean or integer (index) format.



mesh_align Github

This tool basically implements Iterative Closest Point (ICP) algorithm which aims at aligning two geometries rigidly. ICP is an iterative algorithm that finds point matches between the source and target geometry and computes the optimal alignment for these matches. New matches are computed and the process continues until convergence or stoppage.

This version is designed to be quite robust since it can test many initial solutions (ICP is very sensitive to that) in a coarse phase. The outliers (in which ICP is also sensitive) are considered as a ratio of the total number of points, which I found to be the easiest way to handle them.