Skip to content
Snippets Groups Projects
Name Last commit Last update
data
src
LICENSE
README.md

3D-query-replace

Program for the paper Query-Replace Operations for Topologically Controlled 3D Mesh Editing. Guillaume Damiand, Vincent Nivolliers.

This repository repository contains code, scripts and dataset.

Let us denote by SRC_DIR the root directory of the gitlab repository.

1. Install Required Dependencies

2. Compile the Two Programs hexa-subdivision and tetra-to-hexa

// We suppose the current directory is SRC_DIR

mkdir builds
cd builds
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_DIR=/cgal/directory/ ../../src
make

Replace /cgal/directory by the full path to the directory containing CGAL.

3. Run the Programs

One example of run:

// We suppose the current directory is SRC_DIR/builds/release

./hexa-subdivision ../../data/mesh1.off -lmax 5 -draw
  • The first parameter is the filename (surface mesh to load)
  • -lmax gives the maximal subdivision level
  • -draw will draw the final 3-map

Run ./hexa-subdivision -h (or ./tetra-to-hexa -h) for an help showing all options. Press the h key to view the help of the interactive viewer.

4. Reproduce the Experiments of the Paper

// We suppose the current directory is SRC_DIR/builds/release

The experiments given in the paper are obtained by the following runs (for each run, use -draw option to view the final mesh):

4.1 Hexahedral subdivision

./hexa-subdivision ../../data/mesh1.off -lmax 7
./hexa-subdivision ../../data/mesh2.off -lmax 7
./hexa-subdivision ../../data/mesh3.off -lmax 7

4.2 Marching-cube

./hexa-subdivision ../../data/mesh1.off -lmax 7 -marching-cubes
./hexa-subdivision ../../data/mesh2.off -lmax 7 -marching-cubes
./hexa-subdivision ../../data/mesh3.off -lmax 7 -marching-cubes

4.3 Conformal Mesh

./hexa-subdivision ../../data/mesh1.off -lmax 7 -create-transitions
./hexa-subdivision ../../data/mesh2.off -lmax 7 -create-transitions
./hexa-subdivision ../../data/mesh3.off -lmax 7 -create-transitions

Comparison with version WITHOUT signature:

./hexa-subdivision ../../data/mesh1.off -lmax 7 -create-transitions -no-signature
./hexa-subdivision ../../data/mesh2.off -lmax 7 -create-transitions -no-signature
./hexa-subdivision ../../data/mesh3.off -lmax 7 -create-transitions -no-signature

4.4 Mesh Transformation

Require TetGen

./tetra-to-hexa ../../data/mesh1.off
./tetra-to-hexa ../../data/mesh2.off
./tetra-to-hexa ../../data/mesh3.off