GitPedia

MeshReconstruction

Fast and light-weight Marching Cubes library in C++ without any dependencies.

From Magnus2·Updated May 21, 2026·View on GitHub·

This is a small library that can reconstruct a triangle mesh from a signed distance function using the Marching Cubes algorithm and export it to a file in the obj format. The project is written primarily in C++, first published in 2017. Key topics include: marching-cubes, marching-cubes-algorithm, signed-distance-field, signed-distance-functions, surface-reconstruction.

MeshReconstruction

This is a small library that can reconstruct a triangle mesh from a <a href="http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm">signed distance function</a> using the <a href="https://en.wikipedia.org/wiki/Marching_cubes">Marching Cubes algorithm</a> and export it to a file in the <a href="https://de.wikipedia.org/wiki/Wavefront_OBJ">obj format</a>.

The library is self-contained and has no dependencies. The library is fast due to precomputed lookup tables and a narrow-band approach which excludes a lot of marching cubes that are far away from the surface.

The library requires C++14 and has been tested under Visual Studio 2017 and Windows 10 but should port to other systems without major problems.

The library can be used under the terms of the MIT License.

<p align="center"> <img src="overview.png" width="400" alt="Overview"> </p>

Contributors

Showing top 1 contributor by commit count.

View all contributors on GitHub →

This article is auto-generated from Magnus2/MeshReconstruction via the GitHub API.Last fetched: 6/27/2026