MeshLab Python APIΒΆ
MeshLab is a mesh processing application with an embedded Python console.
This documentation covers the embedded Python environment and the public
pymeshlab facade backed by the private _meshlab module.
For a practical overview of the in-app Python environment, see Python scripting.
The documentation is shared on purpose: the core Python API is the
pymeshlab.MeshSet interface and the filter set built on top of it. MeshLab
adds desktop-specific conveniences such as the predefined live ms object and
the mlgui helper for view snapshots and render-state access.
API Reference
- MeshSet
- MlGui
- Filters
- Add Noise to Vertex Color
- Adjust Vertex Color Brightness/Contrast/Gamma
- Adjust Vertex Color Levels
- Adjust Vertex Color White Balance
- Colorize Edges by Scalar
- Colorize Faces by Scalar
- Colorize Vertices by Disk Distance
- Colorize Vertices by Perlin Noise
- Colorize Vertices by Scalar
- Colorize Vertices by Voronoi Regions
- Compute Edge Color by Expression
- Compute Face Color by Expression
- Compute Vertex Color by Expression
- Desaturate Vertex Color
- Equalize Vertex Color
- Invert Vertex Color
- Set Mesh Color
- Set Random Component Color
- Set Random Face Color
- Set Random Layer Color
- Set Vertex Color
- Sharpen Vertex Color by Unsharp Mask
- Smooth Face Color
- Smooth Vertex Color
- Threshold Vertex Color
- Tint Vertex Color
- Compute Curvature (APSS)
- Compute Curvature (Discrete)
- Compute Curvature (RIMLS)
- Compute Curvature (TrueForm)
- Compute Gaussian Curvature (libigl)
- Compute Principal Curvature Directions (libigl)
- Compute Principal Curvature Directions (vcglib)
- Define Custom Face Point Attribute
- Define Custom Face Scalar Attribute
- Define Custom Vertex Point Attribute
- Define Custom Vertex Scalar Attribute
- Compute Face Normals
- Compute Face Normals by Expression
- Compute Normals (TrueForm)
- Compute Point Cloud Normals
- Compute Polygon Face Normals
- Compute Vertex Normals
- Compute Vertex Normals by Expression
- Normalize Face Normals
- Normalize Vertex Normals
- Orient Face Normals by Ray Casting
- Orient Point Cloud Normals
- Orient Vertex Normals by Cameras
- Sharpen Face Normals by Unsharp Mask
- Smooth Face Normals
- Smooth Point Cloud Normals
- Clamp Vertex Scalar
- Clamp Vertex Scalar Gradient
- Compute Edge Scalar by Expression
- Compute Exact Geodesic Distance from Selection (libigl)
- Compute Face Ambient Occlusion
- Compute Face Quality (TrueForm)
- Compute Face Scalar by Expression
- Compute Face Scalar from Geometry
- Compute Face Scalar from Raster Coverage
- Compute Generalized Winding Number (libigl)
- Compute Geodesic Distance from Border
- Compute Geodesic Distance from Point
- Compute Geodesic Distance from Selection (vcglib)
- Compute Harmonic Scalar Field
- Compute Heat Geodesic Distance from Selection (libigl)
- Compute Heat Geodesic Distance from Selection (vcglib)
- Compute Obscurance
- Compute Point Cloud Ambient Occlusion
- Compute Shape Diameter Function
- Compute Signed Distance to Mesh (TrueForm)
- Compute UV Distortion
- Compute Vertex Scalar by Expression
- Compute Vertex Scalar from Camera
- Compute Vertex Scalar from Raster Coverage
- Sharpen Vertex Scalar by Unsharp Mask
- Smooth Vertex Scalar
- Smooth Vertex Scalar by Hessian Energy (libigl)
- Create Annulus
- Create Circle
- Create Cone
- Create Cylinder
- Create Dodecahedron
- Create Grid
- Create Handle and Tunnel Loops
- Create Hexahedron
- Create Icosahedron
- Create Isosurface from Expression
- Create Isosurface from Perlin Noise
- Create Mesh Bounding Box
- Create Octahedron
- Create Plane from Selection
- Create Points on a Sphere
- Create Points on a Spherical Cap
- Create Polyline from Boundary Rims (TrueForm)
- Create Polyline from Cut Graph
- Create Polyline from Mesh Intersection (TrueForm)
- Create Polyline from Planar Section
- Create Polyline from Scalar Isocontour (TrueForm)
- Create Polyline from Selected Edges
- Create Polyline from Selection Perimeter
- Create Polyline from Self-Intersections (TrueForm)
- Create Reeb Graph from Vertex Scalar
- Create Scene Bounding Box
- Create Solid Wireframe
- Create Sphere
- Create Sphere Cap
- Create Square
- Create Symmetric Dodecahedron
- Create Tetrahedron
- Create Torus
- Create Tube from Polyline (TrueForm)
- Create Voronoi Scaffolding
- Create Convex Hull
- Reconstruct Surface by Advancing Front
- Reconstruct Surface by Alpha Shape
- Reconstruct Surface by Alpha Wrapping
- Reconstruct Surface by Ball Pivoting (Gruber)
- Reconstruct Surface by Ball Pivoting (vcglib)
- Reconstruct Surface by Kinetic Partition
- Reconstruct Surface by Marching Cubes (APSS)
- Reconstruct Surface by Marching Cubes (RIMLS)
- Reconstruct Surface by Poisson (CGAL)
- Reconstruct Surface by Scale Space
- Reconstruct Surface by Screened Poisson
- Reconstruct Surface by Smooth Signed Distance
- Reconstruct Surface by Volumetric Merging
- Reconstruct Surface by Voronoi Filtering
- Trim Surface by Scalar Isovalue
- Sample Mesh Elements
- Sample Offset Surface Recursively
- Sample Surface by Monte Carlo
- Sample Surface by Poisson Disk
- Sample Surface by Stratified Triangles
- Sample Surface by Voronoi Relaxation
- Sample Texels
- Sample Vertices by Clustering
- Sample Volume
- Export Cameras from Visible Rasters
- Import Cameras to Visible Rasters
- Rotate Cameras
- Scale Cameras
- Set Camera from Direction
- Set Camera to View Selection
- Set Mesh Camera
- Set Raster Camera
- Transform Camera Extrinsics
- Translate Cameras
- Duplicate Current Layer
- Extract Selected Faces
- Extract Selected Vertices
- Merge Visible Layers
- Remove Current Mesh Layer
- Remove Current Raster
- Remove Hidden Mesh Layers
- Remove Hidden Rasters
- Rename Current Mesh Layer
- Rename Current Raster
- Split into Connected Components
- Split into Connected Components (TrueForm)
- Render from Render-State JSON
- Align by Bounding Box (TrueForm)
- Align by ICP (TrueForm)
- Align by ICP (vcglib)
- Align Meshes Globally
- Align to Corresponding Points (TrueForm)
- Compute Vertex Coordinates by Expression
- Displace Vertices by Fractal Brownian Motion
- Displace Vertices by Heterogeneous Multifractal Noise
- Displace Vertices by Hybrid Multifractal Noise
- Displace Vertices by Ridged Multifractal Noise
- Displace Vertices by Standard Multifractal Noise
- Displace Vertices Randomly
- Displace Vertices toward Target Mesh
- Project Vertices onto the Line of Sight
- Project Vertices onto MLS Surface (APSS)
- Project Vertices onto MLS Surface (RIMLS)
- Sharpen Vertices by Unsharp Mask
- Smooth Polyline on Surface
- Smooth Vertices along One Direction
- Smooth Vertices by HC Laplacian
- Smooth Vertices by Laplacian (TrueForm)
- Smooth Vertices by Laplacian (vcglib)
- Smooth Vertices by Scale-Dependent Laplacian
- Smooth Vertices by Surface-Preserving Laplacian (vcglib)
- Smooth Vertices by Taubin (TrueForm)
- Smooth Vertices by Taubin (vcglib)
- Smooth Vertices by Two-Step Normal Fitting
- Freeze Matrix
- Invert Matrix
- Mirror or Swap Axes
- Normalize Reference Frame
- Rotate
- Rotate to Fitted Plane
- Scale
- Set Matrix from Translation/Rotation/Scale
- Set Matrix from Values or Layer
- Set Matrix to Identity
- Translate
- Compute Distance from Reference Mesh
- Measure Chamfer Distance (TrueForm)
- Measure Geometric Properties
- Measure Hausdorff Distance
- Measure Layer Overlap
- Measure Selection Area and Perimeter
- Estimate Radius from Density
- Measure Face Scalar Histogram
- Measure Face Scalar Statistics
- Measure Vertex Scalar Histogram
- Measure Vertex Scalar Statistics
- Measure Abstract Domain
- Measure Mesh Health (TrueForm)
- Measure Mesh Summary
- Measure Topological Properties
- Measure Topological Properties for Quad Mesh
- Mesh CSG Expression (TrueForm)
- Mesh Difference (geogram)
- Mesh Difference (libigl)
- Mesh Difference (TrueForm)
- Mesh Intersection (geogram)
- Mesh Intersection (libigl)
- Mesh Intersection (TrueForm)
- Mesh Symmetric Difference (geogram)
- Mesh Symmetric Difference (libigl)
- Mesh Symmetric Difference (TrueForm)
- Mesh Union (geogram)
- Mesh Union (libigl)
- Mesh Union (TrueForm)
- Split into Solid Domains (TrueForm)
- Remove All Faces
- Remove Selected Faces
- Remove Selected Faces and Vertices
- Remove Selected Vertices
- Convert to Pure Triangles
- Convert to Quad-Dominant Mesh
- Convert to Quads by 4-8 Subdivision
- Convert to Quads by Triangle Pairing
- Cut Along Crease Edges
- Cut Along Scalar Isocontour (TrueForm)
- Cut Along Selected Edges
- Embed Polyline in Surface
- Flip Edges by Curvature
- Flip Edges by Planarity
- Remesh by Abstract Domain
- Remesh by Centroidal Voronoi Tessellation (geogram)
- Remesh by Edge Flipping (TrueForm)
- Remesh Isotropically (TrueForm)
- Remesh Isotropically (vcglib)
- Remesh to Quads (Instant Meshes)
- Remesh to Quads (QuadWild-BiMDF)
- Remesh Uniformly by Volumetric Resampling
- Trim Surface by Plane
- Simplify by Decimation (TrueForm)
- Simplify by Error Bound (TrueForm)
- Simplify by Quadric Edge Collapse (QSlim)
- Simplify by Quadric Edge Collapse (vcglib)
- Simplify by Quadric Edge Collapse with Texture (vcglib)
- Simplify by Vertex Clustering
- Simplify Marching-Cubes Mesh by Edge Collapse
- Simplify Point Cloud
- Refine by User Expression
- Subdivide by Butterfly
- Subdivide by Catmull-Clark
- Subdivide by Doo-Sabin
- Subdivide by Loop
- Subdivide by LS3 Loop
- Subdivide by Midpoint
- Pack UV Charts (geogram)
- Pack UV Charts (vcglib)
- Defragment Texture Atlas
- Merge Texture Islands
- Compute Chart Segmentation (geogram)
- Convert Per-Vertex UV to Per-Wedge UV
- Convert Per-Wedge UV to Per-Vertex UV
- Create Atlased Mesh from Abstract Domain
- Parametrize by Abstract Domain
- Parametrize by Angle-Based Flattening (geogram)
- Parametrize by As-Rigid-As-Possible (libigl)
- Parametrize by Atlas (geogram)
- Parametrize by Atlas (xatlas)
- Parametrize by Cylindrical Projection
- Parametrize by Flat Plane
- Parametrize by Harmonic Map (libigl)
- Parametrize by Least Squares Conformal Maps (geogram)
- Parametrize by Least Squares Conformal Maps (libigl)
- Parametrize by SLIM (libigl)
- Parametrize by Spectral Conformal Maps (geogram)
- Parametrize by Trivial Per-Triangle Layout
- Parametrize by Voronoi Atlas (vcglib)
- Parametrize from Registered Rasters
- Parametrize from Registered Rasters with Texture
- Parametrize per Vertex by Expression
- Parametrize per Wedge by Expression
- Remove Isolated Components by Diameter
- Remove Isolated Components by Face Count
- Remove Vertices by Scalar
- Remove Zero-Area Faces
- Merge Close Vertices
- Merge Close Wedge UVs
- Remove Duplicate Faces
- Remove Duplicate Vertices (TrueForm)
- Remove Duplicate Vertices (vcglib)
- Remove Unreferenced Vertices
- Split Vertices by Attribute Seam
- Close Holes
- Repair Mismatched Borders
- Extract Outer Shell (TrueForm)
- Invert Face Orientation
- Orient Faces Consistently (TrueForm)
- Orient Faces Consistently (vcglib)
- Orient Faces Outward (TrueForm)
- Remove Isolated Folded Faces by Edge Flip
- Remove T-Vertices
- Repair Non-Manifold Edges
- Repair Non-Manifold Vertices by Splitting
- Repair Self-Intersections (geogram)
- Repair Self-Intersections (TrueForm)
- Repair Watertight Mesh (MeshFix)
- Split Non-Manifold Vertices (TrueForm)
- Dilate Selection
- Erode Selection
- Invert Selection
- Select All
- Select None
- Select Coplanar Faces
- Select Edges by Expression
- Select Faces by Color
- Select Faces by Edge Length
- Select Faces by Expression
- Select Faces by Scalar
- Select Faces by View Angle
- Select Outliers
- Select Vertices by Expression
- Select Vertices by Scalar
- Select Vertices Inside Mesh (TrueForm)
- Select Border
- Select Connected Faces
- Select Crease Edges (TrueForm)
- Select Crease Edges (vcglib)
- Select Faces from Vertices
- Select Ill-Shaped Faces
- Select Non-Manifold Edges (TrueForm)
- Select Non-Manifold Edges (vcglib)
- Select Non-Manifold Vertices
- Select Non-Manifold Vertices (TrueForm)
- Select Self-Intersecting Faces
- Select Small Disconnected Components
- Select Vertex Texture Seams
- Select Vertices from Faces
- Select by Screen Rectangle
- Select Visible Faces
- Select Visible Vertices
- Set Texture
- Convert Object-Space Normal Map to Tangent Space
- Pack Texture Images
- Transfer Abstract Domain to Another Layer
- Transfer Color from Texture to Vertex by Closest Point
- Transfer Vertex Attributes by Closest Point
- Transfer Vertex Attributes to Texture by Closest Point
- Transfer Color from Current Raster to Vertex
- Transfer Color from Visible Rasters to Texture
- Transfer Color from Visible Rasters to Vertex
- Transfer Color from Face to Vertex
- Transfer Color from Mesh to Face
- Transfer Color from Texture to Vertex
- Transfer Color from Vertex to Face
- Transfer Color from Vertex to Texture
- Transfer Scalar from Face to Vertex
- Transfer Scalar from Vertex to Face
- Supporting Types
Examples
Development
Design documents describing the internal architecture are available at docs/design/.