QMeshLab Python APIΒΆ
QMeshLab is a mesh processing application with an embedded Python console.
This documentation covers the embedded Python environment and the public
pymeshlab2 facade backed by the private _qmeshlab 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
pymeshlab2.MeshSet interface and the filter set built on top of it. QMeshLab
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
- Compute Face Color by Expression
- Compute Vertex Color by Expression
- Add Noise to Vertex Color
- Set Random Layer Color
- Colorize Faces by Scalar
- Colorize Vertices by Scalar
- Colorize Vertices by Disk Distance
- Equalize Vertex Color
- Colorize Vertices by Perlin Noise
- Set Random Component Color
- Set Random Face Color
- Set Mesh Color
- Smooth Face Color
- Smooth Vertex Color
- Sharpen Vertex Color by Unsharp Mask
- Adjust Vertex Color Brightness/Contrast/Gamma
- Tint Vertex Color
- Desaturate Vertex Color
- Set Vertex Color
- Invert Vertex Color
- Adjust Vertex Color Levels
- Threshold Vertex Color
- Adjust Vertex Color White Balance
- Colorize Vertices by Voronoi Regions
- Compute Curvature (APSS)
- Compute Principal Curvature Directions (vcglib)
- Compute Principal Curvature Directions (libigl)
- Compute Gaussian Curvature (libigl)
- Compute Curvature (RIMLS)
- Compute Curvature (TrueForm)
- Compute Curvature (Discrete)
- Define Custom Face Point Attribute
- Define Custom Face Scalar Attribute
- Define Custom Vertex Point Attribute
- Define Custom Vertex Scalar Attribute
- Compute Face Normals by Expression
- Compute Vertex Normals by Expression
- Compute Face Normals
- Orient Vertex Normals by Cameras
- Orient Point Cloud Normals
- Compute Normals (TrueForm)
- Compute Polygon Face Normals
- Compute Point Cloud Normals
- Compute Vertex Normals
- Normalize Face Normals
- Normalize Vertex Normals
- Orient Face Normals by Ray Casting
- Smooth Face Normals
- Smooth Point Cloud Normals
- Sharpen Face Normals by Unsharp Mask
- Compute Face Scalar by Expression
- Smooth Vertex Scalar by Hessian Energy (libigl)
- Compute Vertex Scalar by Expression
- Clamp Vertex Scalar
- Compute Geodesic Distance from Border
- Compute Exact Geodesic Distance from Selection (libigl)
- Compute Face Ambient Occlusion
- Compute Generalized Winding Number (libigl)
- Compute Geodesic Distance from Point
- Compute Geodesic Distance from Selection (vcglib)
- Compute Heat Geodesic Distance from Selection (vcglib)
- Compute Heat Geodesic Distance from Selection (libigl)
- Compute Obscurance
- Compute Point Cloud Ambient Occlusion
- Compute Signed Distance to Mesh (TrueForm)
- Compute Vertex Scalar from Camera
- Compute Face Scalar from Raster Coverage
- Compute Vertex Scalar from Raster Coverage
- Compute Shape Diameter Function
- Compute Harmonic Scalar Field
- Compute Face Scalar from Geometry
- Compute UV Distortion
- Clamp Vertex Scalar Gradient
- Smooth Vertex Scalar
- Sharpen Vertex Scalar by Unsharp Mask
- Create Polyline from Selected Edges
- Create Polyline from Planar Section
- Create Annulus
- Create Box
- Create Cone
- Create Dodecahedron
- Create Symmetric Dodecahedron
- Create Grid
- Create Icosahedron
- Create Isosurface from Expression
- Create Octahedron
- Create Points on a Spherical Cap
- Create Points on a Sphere
- Create Polyline from Selection Perimeter
- Create Sphere
- Create Sphere Cap
- Create Tetrahedron
- Create Torus
- Create Plane from Selection
- Create Isosurface from Perlin Noise
- Create Polyline from Mesh Intersection (TrueForm)
- Create Polyline from Scalar Isocontour (TrueForm)
- Create Polyline from Self-Intersections (TrueForm)
- Create Solid Wireframe
- 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 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 Ball Pivoting
- Reconstruct Surface by Volumetric Merging
- Reconstruct Surface by Voronoi Filtering
- Trim Surface by Scalar Isovalue
- Sample Volume
- Sample Surface by Voronoi Relaxation
- Sample Vertices by Clustering
- Sample Mesh Elements
- Sample Surface by Monte Carlo
- Sample Surface by Poisson Disk
- Sample Offset Surface Recursively
- Sample Surface by Stratified Triangles
- Sample Texels
- Transform Camera Extrinsics
- Rotate Cameras
- Scale Cameras
- Translate Cameras
- Import Cameras to Visible Rasters
- Export Cameras from Visible Rasters
- Set Camera from Direction
- Set Mesh Camera
- Set Raster Camera
- Set Camera to View Selection
- Remove Current Mesh Layer
- Remove Current Raster
- Remove Hidden Mesh Layers
- Remove Hidden Rasters
- Duplicate Current Layer
- Merge Visible Layers
- Extract Selected Faces
- Extract Selected Vertices
- Rename Current Mesh Layer
- Rename Current Raster
- Split into Connected Components
- Render from Render-State JSON
- Align to Corresponding Points (TrueForm)
- Align by ICP (vcglib)
- Align by ICP (TrueForm)
- Align Meshes Globally
- Align by Bounding Box (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
- Smooth Vertices by Surface-Preserving Laplacian (vcglib)
- Smooth Vertices by Laplacian (TrueForm)
- Project Vertices onto MLS Surface (APSS)
- Project Vertices onto MLS Surface (RIMLS)
- Smooth Vertices by Taubin (TrueForm)
- Smooth Vertices along One Direction
- Project Vertices onto the Line of Sight
- Smooth Vertices by HC Laplacian
- Smooth Vertices by Laplacian (vcglib)
- Smooth Vertices by Scale-Dependent Laplacian
- Smooth Vertices by Taubin (vcglib)
- Smooth Vertices by Two-Step Normal Fitting
- Sharpen Vertices by Unsharp Mask
- Freeze Matrix
- Invert Matrix
- Set Matrix to Identity
- Set Matrix from Values or Layer
- Set Matrix from Translation/Rotation/Scale
- Normalize Reference Frame
- Mirror or Swap Axes
- Rotate
- Rotate to Fitted Plane
- Scale
- Translate
- Measure Chamfer Distance (TrueForm)
- Compute Distance from Reference Mesh
- Measure Geometric Properties
- Measure Hausdorff Distance
- Measure Selection Area and Perimeter
- Measure Layer Overlap
- Measure Face Scalar Histogram
- Measure Face Scalar Statistics
- Measure Vertex Scalar Histogram
- Measure Vertex Scalar Statistics
- Estimate Radius from Density
- Measure Topological Properties
- Measure Topological Properties for Quad Mesh
- Measure Mesh Summary
- Mesh Difference (libigl)
- Mesh Difference (TrueForm)
- Mesh Intersection (libigl)
- Mesh Intersection (TrueForm)
- Mesh Union (libigl)
- Mesh Union (TrueForm)
- Mesh Symmetric Difference (libigl)
- Mesh Symmetric Difference (TrueForm)
- Mesh CSG Expression (TrueForm)
- Remove All Faces
- Remove Selected Faces
- Remove Selected Faces and Vertices
- Remove Selected Vertices
- Convert to Quad-Dominant Mesh
- Convert to Pure Triangles
- Convert to Quads by 4-8 Subdivision
- Convert to Quads by Triangle Pairing
- Cut Along Scalar Isocontour (TrueForm)
- Cut Along Crease Edges
- Remesh by Edge Flipping (TrueForm)
- Flip Edges by Curvature
- Flip Edges by Planarity
- Remesh to Quads (Instant Meshes)
- Remesh to Quads (QuadWild-BiMDF)
- Remesh Isotropically (vcglib)
- Remesh Isotropically (TrueForm)
- Remesh Uniformly by Volumetric Resampling
- Simplify Marching-Cubes Mesh by Edge Collapse
- Simplify by Decimation (TrueForm)
- Simplify by Error Bound (TrueForm)
- Simplify by Vertex Clustering
- Simplify by Quadric Edge Collapse (vcglib)
- Simplify by Quadric Edge Collapse (QSlim)
- Simplify by Quadric Edge Collapse with Texture (vcglib)
- 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
- Defragment Texture Atlas
- Merge Small Texture Islands
- Convert Per-Vertex UV to Per-Wedge UV
- Convert Per-Wedge UV to Per-Vertex UV
- Parametrize per Vertex by Expression
- Parametrize per Wedge by Expression
- Parametrize from Registered Rasters with Texture
- Parametrize by As-Rigid-As-Possible (libigl)
- Parametrize from Registered Rasters
- Parametrize by Harmonic Map (libigl)
- Parametrize by Least Squares Conformal Maps (libigl)
- Parametrize by SLIM (libigl)
- Parametrize by Cylindrical Projection
- Parametrize by Flat Plane
- Parametrize by Trivial Per-Triangle Layout
- Parametrize by Voronoi Atlas (vcglib)
- Parametrize by Atlas (xatlas)
- 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 (vcglib)
- Remove Duplicate Vertices (TrueForm)
- 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 Outward (TrueForm)
- Remove Isolated Folded Faces by Edge Flip
- Remove T-Vertices
- Orient Faces Consistently (vcglib)
- Repair Non-Manifold Edges
- Repair Non-Manifold Vertices by Splitting
- Repair Self-Intersections (TrueForm)
- Repair Watertight Mesh (MeshFix)
- Dilate Selection
- Erode Selection
- Invert Selection
- Select All
- Select None
- Select Faces by Scalar
- Select Vertices by Scalar
- Select Faces by Color
- Select Faces by Expression
- Select Faces by View Angle
- Select Faces by Edge Length
- Select Outliers
- Select Vertices by Expression
- Select Vertices Inside Mesh (TrueForm)
- Select Border
- Select Connected Faces
- Select Crease Edges (vcglib)
- Select Crease Edges (TrueForm)
- Select Faces from Vertices
- Select Non-Manifold Edges (vcglib)
- Select Non-Manifold Edges (TrueForm)
- Select Non-Manifold Vertices
- Select Ill-Shaped Faces
- 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: Texture to Vertex Color
- Transfer: Vertex Attributes to Texture
- Transfer: Vertex Color to Texture
- Transfer Color: Face to Vertex
- Transfer Color: Mesh to Face
- Transfer Color: Texture to Vertex
- Transfer Color: Vertex to Face
- Transfer Quality: Face to Vertex
- Transfer Quality: Vertex to Face
- Vertex Attribute Transfer
- Project Active Rasters Color to Current Mesh Texture
- Project Active Rasters Color to Current Mesh
- Project Current Raster Color to Current Mesh
- Supporting Types
Examples
Development
Design documents describing the internal architecture are available at docs/design/.