Skip to content
Code implementing a model repair algorithm using biharmonic fields.
C++ Other
  1. C++ 98.7%
  2. Other 1.3%
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Mesh Repair --- README

This repository holds the source code (in C++) for the repair isosurface construction introduced in 1. We also include some example meshes (with defects) to test it.


To compile and link the source code you will need cmake, glm and eigen. The CMakeLists is very straightforward, and requires that you set environment variables pointing to the directories containing the headers of glm and eigen. For example

export EIGEN3_INCLUDE_DIR=/usr/include/eigen3
export GLM_INCLUDE_DIR=/usr/include

Then in the usual way, do, if MeshRepair is the directory into which you've cloned this repository,

cd MeshRepair
mkdir build
cd build
cmake ..

to build the binary.

You can then run it as

./MeshRepair <inFile.ply> <outFile.ply> [--border] [--numVoxels <N>]

where --border indicates the mesh is not a complete closed object (aside from the holes), and --numVoxels indicates the size of the voxelization used, which should be chosen so that the voxels are of the same order of magnitude as the edges of the triangles in the mesh. if no voxelization size is selected, the value defaults to 128.

Example files

we provide four sample holes from the Portalada 2, as test data, in files test1.ply, test2.ply, test3.ply and test4.ply. Recommended parameters for our test examples are

./MeshRepair test1.ply test1-out.ply --border --numVoxels 64 
./MeshRepair test2.ply test2-out.ply --border
./MeshRepair test3.ply test3-out.ply --border
./MeshRepair test4.ply test4-out.ply --border


1: O. Argudo, P. Brunet, A. Chica and À. Vinacua: "Biharmonic fields and mesh completion", Graphical Models (2015),

2: M.Callieri, A. Chica, M. Dellepiane, I. Besora, M. Corsini, J. Moyés, G. Ranzuglia, R. Scopigno and P. Brunet: "Multiscale acquisitionand presentation of very large artifacts: the case of portalada", ACM J. Comut. Cult. Herit. 3(4) (2011) 14:1--14:20

You can’t perform that action at this time.