Git Product home page Git Product logo

bichon's Introduction

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

  • ๐Ÿ“ Input: Manifold and watertight triangle mesh, without self intersections.
    • Optional: Constraint Points and Feature Tagging.
  • โžฐ Output: High Order (Bezier) Tetrahedral Mesh
    • Coarsened.
    • Valid (non-flip) Elements.
    • No Intersection.
    • Distance Bound.
    • Feature Preserving.
    • Bijective High-order Surface to the input.

News

  • ๐Ÿ“ฐ 06/17/2021: First version of Bichon code is released!

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.

  • We ask the mesh to be manifold, watertight, no degenerate triangle, and without self intersection. The precondition checks inside the program include numerical tolerance.

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

  • File might contains the following fields (all optional),
    • 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.
  • We typically generate these files with h5py or HighFive (C++).

Output Format

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.

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

bichon's People

Contributors

jiangzhongshi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.