guohaoxiang / CE-PolyCube-1

Source code of SIGGRAPH 2020 paper: Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CE-PolyCube: Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing

Haoxiang Guo, Xiaohan Liu, Dong-Ming Yan, Yang Liu. ACM Transactions on Graphics (SIGGRAPH2020).

If you are interested in the algorithm details, please refer to our paper. This program works on 64-bit windows.

Prerequisite

The libraries and softwares above need to be installed manually, please set BOOST_ROOT CGAL_DIR in your system path if Boost and CGAL installers do not set them sucessfully.

Our source code has the following build-in dependencies:

Data Preparation

Our program takes a tetrahedral mesh (*.vtk) and its feature edges (*.fea) as input. The feature file starts with the number of feature segments n, followed by n lines, where each line contains the two vertex indices of a feature edge segment. You can generate tetrahedral meshes from surface meshes using TetGen or download our preprocessed data from here

Installation & Usage

First, clone this repository:

git clone https://github.com/msraig/CE-PolyCube.git
cd CE-PolyCube

We provide both the source code and the compiled executable files(in Bin folder). To use the executable files directly, please first set DATA_ROOT_PATH (path contains model folders), HEXEX_PATH (path containing hexex.exe) and POLYCUT_PATH (path containing polycut.exe) in .\Script\gen_hex.bat with no trailing slash. Then you can process a specific model, e.g sculpt by running:

cd Scripts
gen_hex.bat sculpt

If everything goes well, there will be three new files in DATA_ROOT_PATH/sculpt folder:

  • sculpt_deform_polycube.vtk: the initial PolyCube mesh.
  • sculpt_cut_flattening.vtk: the CE-PolyCube mesh.
  • sculpt_hex_opt.vtk: the final optimized all-hex mesh.

Or if you want to recompile the project, please go to the root directory, then run:

mkdir Build
cd Build
cmake ..

Build the solution in .\Build folder, then you can find the generated executable files in .\Bin folder. Then modify and run .\Script\gen_hex.bat as previously mentioned.

We also provide the processed data here.

Citation

@article{Guo2020Cut,
  title={Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing},
  author={Guo, Hao-Xiang and Liu, Xiaohan and Yan, Dong-Ming and Yang, Liu},
  journal={ACM Transactions on Graphics (TOG)},
  volume={39},
  number={4},
  pages={106:1--106:14},
  year={2020},
  publisher={ACM New York, NY, USA}
}

Please contact us (Haoxiang Guo ghx17@mails.tsinghua.edu.cn, Xiaohan Liu xh.liu.tech@gmail.com, Yang Liu yangliu@microsoft.com) or file an issue if you meet problems in using our code.

About

Source code of SIGGRAPH 2020 paper: Cut-enhanced PolyCube-Maps for Feature-aware All-Hex Meshing

License:MIT License


Languages

Language:C++ 98.6%Language:CMake 1.2%Language:Batchfile 0.3%