Robust Coarse Curved TetMesh Generation
Zhongshi Jiang, Ziyi Zhang, Yixin Hu, Teseo Schneider, Denis Zorin, Daniele Panozzo. ACM Transactions on Graphics (SIGGRAPH 2021)
🎊 We provide generated high order tetrahedral meshes and their surface for futher research and developement.
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
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.
E is feature edges. Matrix of |E|x2, with each row indicating the endpoints (v0,v1) of the marked edge.V is the additional feature corners (the junction of several features). Corners can be automatically infered if there are three or more features meet. Therefore, V is only supplied when there is a corner with two feature lines meet. Vector of |V| with vertex indices.P_fid and P_bc for the constraint points where the distance bound is imposed upon. Vector of |P| for the list of faces where the points are, and Matrix of |P|x3 for their corresponding barycentric coordinates on each points.Our output file is in HDF5 format .h5, with the following fields
lagr as |l|x3 matrix of volume Lagrange control points for the volume.cells as |t|x|n| as the matrix of connectivity.Additionally, the following fields are useful in other cases.
complete_cp for the surface B'ezeir control points. Array of |F| x |n| x 3 stores (in duplicates) the control points for each face.mV,mbase,mtop, mF encode the internal shell structure.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.
./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.
python/ folder contains several scripts to visualize or convert our serialization file.
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.
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
The source code in this repository is released under MIT License. However, be aware that several dependencies (notably, CGAL with GPLv3) have differing licenses.