Warning: This repo is work in progress.
Implementation of a coarse hole filling algorithm for triangle meshes. Main purpose is a Python package. Can be used as a C++ library as well.
Based on paper Filling Holes in Meshes, P. Liepa, Eurographics Symposium on Geometry Processing (2003).
conda install -c conda-forge hole-filling-liepa
Only Python 3.9, x64 Windows and MacOS 11 are supported at this point.
pip install hole-filling-liepa
- Clone this repository.
- Create build environment running script
create-env.sh
in Linux/MacOS orcreate-env.bat
in Windows. - Activate build environment.
conda activate ../hfl-env
- Build development version from source.
pip install -e .
from hole_filling_liepa.core import fill_hole_liepa, find_boundary_loops
from hole_filling_liepa.utils import read_obj, write_obj
vertices, faces = read_obj('mesh.obj')
boundary_loops = find_boundary_loops(faces)
patch_faces = fill_hole_liepa(vertices, faces, boundary_loops[0], method='angle')
write_obj('patch.obj', vertices, patch_faces)