MeshLib Features

3D mesh processing library for C++, Python, C#, C and JavaScript: production-ready algorithms for meshes, point clouds and volumes, grouped by task.

Mesh Booleans and Cutting

Combine, subtract and intersect solid models, or cut them along planes and contours.

  • Cut and Trim with a Plane

    Split or trim a mesh with a plane and get the section contours.

  • Cut along Contours

    Cut a mesh along polylines drawn on its surface.

  • Unite Many Meshes

    Merge many overlapping meshes into a single solid in one call.

  • Convex Hull

    Build the convex hull of a mesh, a point cloud or a 2D contour.

  • 2D Contour Triangulation

    Turn closed 2D contours into a flat triangle mesh.

Mesh Repair and Healing

Fix scan and CAD defects before any downstream step.

Mesh processing overview

Simplification and Remeshing

Control polygon count and triangle quality.

Point Cloud Processing

Turn raw LiDAR and scanner data into clean, usable meshes.

Point cloud processing overview
  • Normals Estimation

    Compute and orient point normals for reconstruction and shading.

  • Sampling and Downsampling

    Thin dense clouds uniformly or on a grid.

    Sampling and Downsampling

    Sampling takes a representative subset of points. Uniform and grid sampling are implemented.

    • Dense red crocodile point cloud with every captured point shown
      All points
    • Crocodile point cloud after uniform sampling keeps fewer red points
      Sampled points
  • Outlier Removal

    Find and remove stray points and small disconnected clusters.

  • Point Cloud Smoothing

    Relax noisy point positions toward their neighbors to smooth a scan.

  • Mesh to Point Cloud

    Turn a mesh into a point cloud with normals or sample its surface densely.

  • Terrain Triangulation

    Triangulate 2.5D terrain and survey points in the XY plane.

Volumes, Voxels and CT

Signed distance fields, voxel grids and medical scans.

Registration and Alignment

Bring scans and models into one coordinate system.

Inspection and Measurement

Measure, compare and check models.

  • Collision Detection

    Find colliding and intersecting triangles between meshes.

    Discover more
  • Wall Thickness

    Measure the thickness of a part at every vertex.

  • Distance and Deviation

    Compare a mesh or scan with a reference and color the deviation.

    Distance and Deviation

    Finds the minimal signed or unsigned distance between two meshes in real time.

    • Distance measured between two meshes
    • Two interlocking ring meshes with a signed distance value measured between them
    • MeshInspector Distance Compare panel showing deviation colors on a crank model
  • Mesh Segmentation

    Split a mesh into regions by curvature.

    Mesh Segmentation

    Selects a mesh region separated from the rest by a high-curvature boundary (or another metric, including custom ones), given 2-3 points on the boundary. Here each crest is segmented by two points picked on its base.

    • Dragon head mesh with orange crest spikes segmented by curvature
  • Geodesic Paths

    Trace paths along the surface between points.

  • Distance Maps

    Height maps from meshes or contours, with iso-lines.

    Distance Maps

    Distance map from a mesh

    A depth map from a plane to a mesh, shown as a greyscale image: black pixels are the farthest, white pixels the closest.

    • Yellow crocodile mesh used as the source for a depth map
      Mesh
    • Greyscale distance map of the crocodile with the nearest points white
      Distance map

    Distance map from contours

    A field of distances in the contour plane from each pixel to the closest contour point, signed or unsigned. Zero corresponds to the input contour.

    • Closed crocodile outline drawn as the input contour on a dark plane
      Input contour
    • Distance field around the crocodile outline rendered in greyscale
      Signed distance map
    • Distance map of the same contour with the inner area white
      Unsigned distance map

    Iso-lines

    Finds iso-line contours on a distance map of any kind: the red line is the input contour, the blue lines are iso-lines.

    • Yellow distance map surface with input contour and iso-lines drawn as dashes

    Merging maps

    Merges distance maps by minimum, maximum or subtraction.

    • First distance map surface with a small dashed closed contour
      Distance map A
    • Second distance map surface with a large curved contour drawn on it
      Distance map B
    • Merged distance map keeping the intersection as a small closed contour
      Maximum (intersection)
    • Merged distance map keeping the union as one wide contour
      Minimum (union)

Formats, Viewer and Languages

Everything around the algorithms.

Offsetting and Deformation

Grow, shrink, thicken, wrap and reshape surfaces and contours.

  • Mesh Offsetting

    Precise expansion or contraction of a 3D mesh surface.

    Discover more
  • Mesh Thickening

    Turn an open surface into a solid of a set thickness.

  • Partial Offset

    Offset only a selected part of an open surface.

    Partial Offset

    Offsets only the selected part of a mesh and produces a single-component mesh as the result.

    • Scanned figure model with red highlighted areas chosen for offset
      Red faces are selected
    • Scanned figure after offsetting the highlighted areas into one solid
      Selected parts offset
  • 2D Contour Offsetting

    Grow or shrink planar 2D contours by a set distance.

  • Shrinkwrap

    Move every vertex onto a reference surface while keeping the mesh topology.

  • Free-Form Deformation

    Bend and warp a mesh with a lattice of control points.

    Free-Form Deformation

    Applies a free-form transformation to a mesh, or finds the best free-form transformation to fit given points. Grey points are the reference grid of the transform; its resolution is customizable.

    • Mesh with the grey reference grid of a free-form transform before deformation
      Before
    • The same mesh warped by moving points of the free-form grid
      After
  • Laplacian Deformation

    Move a region of the surface and let the rest follow smoothly.

    Laplacian Deformation

    Modifies a surface region following the movement of a few fixed points and preserves curvature elsewhere. The red area is the deformed area; a few points were fixed on the forehead.

    • Head mesh with the red region selected for Laplacian deformation
      Before
    • Head mesh after the red region follows the moved points
      After

Manufacturing and 3D Printing

Prepare parts for printing and machining.

  • TPMS and Lattice Infill

    Fill a part with gyroid, Schwarz P or cellular lattice structures for 3D printing.

  • G-code Visualization

    Load G-code programs to view and analyze tool movements.

  • Text Embossing

    Turn text into meshes and place it on a surface to emboss or engrave.

  • Overhang Detection

    Find overhanging regions that need support in 3D printing.

  • Undercut Fixing

    Fill undercuts so a part can be produced from one direction.

  • 3D Nesting

    Pack many parts compactly into a build volume.

  • CNC Tool Paths

    Generate milling tool paths for a given tool radius.

  • Swept Volume

    Compute the volume a tool sweeps along its path.

Try MeshLib now

Booleans, mesh repair, decimation and ICP — in your browser, as JavaScript and WebAssembly. No install, no sign-up.

Open live demo

Or install the SDK — free to evaluate

Setup guide · binaries or CMakeSetup guide · binaries, MeshLibC2