bichon

Robust Coarse Curved TetMesh Generation

View the Project on GitHub jiangzhongshi/bichon

Bijective and Coarse High-Order Tetrahedral Meshes

Zhongshi Jiang, Ziyi Zhang, Yixin Hu, Teseo Schneider, Denis Zorin, Daniele Panozzo. ACM Transactions on Graphics (SIGGRAPH 2021)

📺 Talk (YouTube), 📝 Paper

TL;DR

News

Tips

Dataset

🎊 We provide generated high order tetrahedral meshes and their surface for futher research and developement.

Installation via CMake CMake

Our system is developed in a Linux 🐧 environment, with GCC-9 and Clang-12, and is tested on macOS 🍏 and Windows. Please refer to cmake.yml for a more detailed setup.

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make -j4

Usage

Input Format

Basic input is the triangle mesh, in the format of .obj/.off/.ply/.stl.

Optional input is and HDF5 file, encoding feature tagging and constraint points, in the format of .h5.

Output Format

Our output file is in HDF5 format .h5, with the following fields

Additionally, the following fields are useful in other cases.

Our internal ordering of the node (inside each high order element) is generated recursively (tuple_gen). Conversion convention to GMSH (triangle6, triangle10, triangle15,tetra20, tetra35) is manually coded in the same file. Further conversion is still on the way and PRs are welcome.

Command Line Usage

./cumin_bin -i INPUT_MESH -o OUTPUT_FOLDER/
Options:
  -h,--help                   Print this help message and exit
  -i,--input TEXT:FILE REQUIRED
                              input mesh name
  -g,--graph TEXT             feature graph and constraint point file .h5
  -o,--output TEXT=./         output dir to save the serialization .h5 file
  -l,--logdir TEXT            log dir
  --curve-distance_threshold FLOAT distance bound for the sampled point. Default on all the vertices, can be specified for the feature h5.
  --curve-order INT          the order of the surface mesh. Tetrahedral mesh will be of order +1
  --feature-dihedral_threshold FLOAT automatic detecting feature based on dihedral angle.
  --shell-target_edge_length FLOAT target edge length, only as a heuritic upper bound.

Visualization

python/ folder contains several scripts to visualize or convert our serialization file.

Examples

Hello Bunny

After compilation, you can launch (from the build/ directory)

wget https://raw.githubusercontent.com/libigl/libigl-tutorial-data/master/bunny.off # get the bunny mesh
./cumin_bin -i bunny.off -o ./

To obtain bunny.off.h5 in the current directory.

Conversion

We provide a simple script to convert from our format to be compatible with gmsh visualizer for a visualization similar to Fig.4 in our paper.

Requiring python packages pip install meshio h5py numpy

python ../python/format_utils.py bunny.off.h5 bunny.msh

License

The source code in this repository is released under MIT License. However, be aware that several dependencies (notably, CGAL with GPLv3) have differing licenses.

Nerd Corner