Skip to main content

Welcome to MeshMash

MeshMash is a powerful Python library that provides advanced mesh processing utilities with a focus on spectral geometry methods. It enables you to analyze, decompose, and manipulate 3D meshes using cutting-edge algorithms from computational geometry.

Key Features

Spectral Decomposition

Compute Laplacian eigendecomposition and Heat Kernel Signatures (HKS) for geometric analysis

Mesh Operations

Extract components, subset meshes, fix topology, and perform complex mesh transformations

Graph Processing

Convert meshes to graphs, compute adjacencies, and perform label propagation

Advanced Splitting

Hierarchically split large meshes using spectral methods for parallel processing

What Makes MeshMash Unique?

MeshMash implements state-of-the-art spectral methods including:
  • Cotangent Laplacian computation with robust formulation
  • Heat Kernel Signatures for multi-scale geometric features
  • B-spline spectral filters for frequency-domain processing
  • Band-by-band eigendecomposition for large meshes
Built-in support for:
  • Non-manifold mesh handling via robust Laplacian
  • Automatic mesh repair and topology fixing
  • Connected component analysis and filtering
  • Efficient sparse matrix operations
Designed for large-scale data:
  • Hierarchical mesh splitting for parallel processing
  • Cloud storage integration (Google Cloud, local filesystems)
  • Memory-efficient sparse representations
  • Chunked processing pipelines

Use Cases

MeshMash is ideal for:
  • 3D Shape Analysis: Extract geometric features for machine learning
  • Mesh Segmentation: Partition meshes using spectral clustering
  • Neuroscience: Process neuronal morphology and connectivity data
  • Computer Graphics: Analyze and filter mesh geometry in frequency domain
  • Computational Biology: Work with molecular surfaces and biological structures
MeshMash integrates seamlessly with popular libraries like NumPy, SciPy, PyVista, and gpytoolbox.

Core Capabilities

Laplacian Methods

Compute cotangent Laplacian with optional robust formulation for non-manifold meshes:
from meshmash import cotangent_laplacian

# Standard cotangent Laplacian
L, M = cotangent_laplacian(mesh)

# Robust Laplacian for non-manifold meshes
L, M = cotangent_laplacian(mesh, robust=True, mollify_factor=1e-5)

Spectral Decomposition

Decompose meshes into their spectral components:
from meshmash import decompose_mesh

eigenvalues, eigenvectors = decompose_mesh(
    mesh, 
    n_components=100,
    robust=True
)

Mesh Utilities

Powerful utilities for mesh manipulation:
from meshmash import (
    largest_mesh_component,
    subset_mesh_by_indices,
    mesh_to_adjacency,
    combine_meshes
)

# Extract largest connected component
largest_comp = largest_mesh_component(mesh)

# Convert to graph adjacency matrix
adj = mesh_to_adjacency(mesh)

Ready to Get Started?

Installation

Install MeshMash with pip or conda

Quick Start

Run your first mesh processing code

Build docs developers (and LLMs) love