This repo containes implementations related to parametrization algorithms.
- SLIM (with and without fixed boundary)
- Tutte
- Mesh cut
- Seam path definition
All the algorithms rely on CGAL or libigl. Other dependencies:
- boost
- Eigen3
- gmp
- cmake
mkdir build
cd build
cmake .. && make -j4
If an error regarding "COMP0048 version" appears then please edit build/_deps/libigl-src/CMakeLists.txt
commenting out ligigl version.
SLIM parametrization can be compute with:
./build/slim your_obj_file.obj
this will generate a new file your_obj_file_slim.obj
containing the parametrize mesh to the unit disk.
Note this algorithm requires a surface homeomorphic to a disk. If has a higher genus, then it is possible to cut it.
SLIM parametrization without a fixed boundary can be compute with:
./build/slim your_obj_file.obj
this will generate a new file your_obj_file_freeslim.obj
containing the parametrize mesh.
Note this algorithm requires a surface homeomorphic to a disk. If has a higher genus, then it is possible to cut it.
SLIM parametrization can be compute with:
./build/tutte your_obj_file.obj
this will generate a new file your_obj_file_tutte.obj
containing the parametrize mesh to a disk.
Note this algorithm requires a surface homeomorphic to a disk. If has a higher genus, then it is possible to cut it.
A seam path is computed based on an ordered set of points it cut through. These points can be defined in pairs. For example:
4199 3041
3041 410
the seam will list all vertex starting from vertex #4199 to vertex #3041. Then from vertex #3041 to vertex #410. The seam path is defined based on Dijkstra algorithm.
Running:
./build/dijkstra_seam your_obj_file.off your_vertex_list.txt
produces a txt file your_obj_file.off.selection.txt
containing the seam path.
Once the seam path is defined, it is possible to cut the mesh:
./build/cut your_obj_file.off your_obj_file.off.selection.txt
this produces a new obj file your_obj_file_cut.obj
.