Skip to content

Canjia-Huang/CWDT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conforming Weighted Delaunay Triangulations

Input surface mesh Result surface mesh Result tetrahedral mesh
(shrink: 0.3)
Result tetrahedral mesh
(in-out)
Result tetrahedral mesh
(wireframe)
Result tetrahedral mesh
(clipping)

This repo is a rearrangement of the code for the work "Conforming Weighted Delaunay Triangulations" by Marc Alexa. The original reference implementation can be found at [source code].

If you use this code in your research, please cite the original work:

@article{10.1145/3414685.3417776,
	author = {Alexa, Marc},
	title = {Conforming weighted delaunay triangulations},
	year = {2020},
	issue_date = {December 2020},
	publisher = {Association for Computing Machinery},
	address = {New York, NY, USA},
	volume = {39},
	number = {6},
	issn = {0730-0301},
	url = {https://doi.org/10.1145/3414685.3417776},
	doi = {10.1145/3414685.3417776},
	journal = {ACM Trans. Graph.},
	month = nov,
	articleno = {248},
	numpages = {16},
	keywords = {simplicial meshes, conforming meshes}
}

💡 What did I do?

  • Improved code organization
  • Enhanced readability
  • Updated CMake build configurations
  • Added command line applications

🔗 Requirements / dependencies

Note

The gcc version needs to be compatible with the boost version. It seems that gcc 15.1 is not compatible with boost 1.78.0... 🤔

🏁 Getting started

git clone https://github.com/Canjia-Huang/CWDT.git

🔨 Build

mkdir build
cd build
cmake ..
make

💻 Usage

./CWDT [OPTIONS] input_surface_mesh_path

Options (use --help for more details):

OPTIONS:
  -h,     --help              Print this help message and exit 
          --ns INT            Maximum number of splits (default: 100). 
          --nr INT            Maximum number of rounds (default: 100). 
          --hf FLOAT          Height factor (default: 1.0). 
          --wf FLOAT          Weight factor (default: 1.0). 
          --tol FLOAT         Minimum tolerance (default: 1e-9). 
          --np                Not utilize the winding number to eliminate external tetrahedra 
                              (default: false). 
          --pthr FLOAT        Threshold during the peel operation (default: 0.5), where 
                              tetrahedra with a winding number of their centroids less than 
                              this thr are identified as external. 
          --shrink FLOAT      The shrink factor of each tetrahedron in the result used for 
                              visualization (default: 0.3). 

Example

./CWDT ../data/spot_quadrangulated.obj

The following result files will be generated in the directory of the input surface mesh path upon successful execution:

  • result_surface_mesh.off - the surface mesh of the input surface mesh in the resulting tetrahedral mesh
  • result_weighted_surface_mesh.off - similar as "result_surface_mesh.off", each vertex contains a weight
  • result_tets.obj - the file used for visualizating the resulting tetrahedral mesh
  • result_tets.mesh - the resulting tetrahedral mesh (can be opened with Gmsh), in which the tetrahedra inside have a label of "1", while the outside tetrahedra have a label of "2"

About

Conforming Weighted Delaunay Triangulations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published