Skip to content

Canjia-Huang/SH-cross-frame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SH-cross-frame

This repo is a refactoring of the unofficial source code for the paper "Boundary aligned smooth 3D cross-frame field" as implemented by Kenshi Takayama [code], with the goal of making it easier to configure and use.

If you have any questions about the implementation, you can refer to the official [code] (written in Fortran and Maxima) provided by the author, Jin Huang.

If you use this code, you may need to cite the paper:

@article{10.1145/2070781.2024177,
    author = {Huang, Jin and Tong, Yiying and Wei, Hongyu and Bao, Hujun},
    title = {Boundary aligned smooth 3D cross-frame field},
    year = {2011},
    issue_date = {December 2011},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    volume = {30},
    number = {6},
    issn = {0730-0301},
    url = {https://doi.org/10.1145/2070781.2024177},
    doi = {10.1145/2070781.2024177},
    journal = {ACM Trans. Graph.},
    month = dec,
    pages = {1–8},
    numpages = {8},
    keywords = {N-RoSy frame field, hexahedral, spherical harmonics}
}

💡 What did I do?

  • refactor CMake configuration
  • add command line application
  • make FRAME3D_FIXED_BOUNDARY macro optional
  • make deps lighter
    • remove tetgen deps (already included in geogram)

🔗 Requirements / dependencies

🏁 Getting started

git clone https://github.com/Canjia-Huang/SH-cross-frame.git

🔨 Build

mkdir build
cd build
cmake ..
make

💻 Usage

After successful compilation, the executable SHCrossFrame_CLI will be in the build/bin directory. To use it:

./SHCrossFrame_CLI [OPTIONS]


OPTIONS:
  -h,     --help              Print this help message and exit 
  -i TEXT:FILE REQUIRED       input triangle/tetrahedral mesh path (if the input is a triangle 
                              mesh, will be tetrahedralization by tetgen, and save to 
                              `output_path`+`_tet.mesh`) 
  -o TEXT                     output per vertex frame field file (.fra) path 
  -w FLOAT                    boundary weight (default: 200) 
  -v                          output visualization file (.geogram)

After a successful run, a .fra frame field file will be generated. The format is as follows:

FRA 1
nb_vertices 3 4
vertex0-vector0.x vertex0-vector0.y vertex0-vector0.z
vertex0-vector1.x vertex0-vector1.y vertex0-vector1.z
vertex0-vector2.x vertex0-vector2.y vertex0-vector2.z
vertex1-vector0.x vertex1-vector0.y vertex1-vector0.z
...

Under the -v option, a .geogram visualization file will also be created, which can be opened with Vorpaview (the visualization software from the Geogram library).

Example

./SHCrossFrame_CLI -i ../../data/sculpture.obj -v

About

Boundary Aligned Smooth 3D Cross-Frame Field

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages