Skip to content

A MultiMaterial Tetrahedral Meshing Library and Application

License

Notifications You must be signed in to change notification settings

dyollb/Cleaver2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Cleaver2

Cleaver2 Release Source Code

This is the open-source repository for Cleaver2, a tetrahedral meshing tool. This distribution comes with both a command-line interface, and a GUI.

Aknowledgements

Cleaver - A MultiMaterial Tetrahedral Meshing Library and Application

The Cleaver Library is based on the 'Lattice Cleaving' algorithm:

Bronson J., Levine, J., Whitaker R., "Lattice Cleaving: Conforming Tetrahedral Meshes of Multimaterial Domains with Bounded Quality". Proceedings of the 21st International Meshing Roundtable (San Jose, CA, Oct 7-10, 2012)

The method is theoretically guaranteed to produce valid meshes with bounded dihedral angles, while still conforming to multimaterial material surfaces. Empirically these bounds have been shown to be significant.

Cleaver is an Open Source software project that is principally funded through the SCI Institute's NIH/NIGMS CIBC Center. Please use the following acknowledgment and send us references to any publications, presentations, or successful funding applications that make use of NIH/NIGMS CIBC software or data sets.

"This project was supported by the National Institute of General Medical Sciences of the National Institutes of Health under grant number P41GM103545."

Author: Jonathan Bronson
Contributor: Ross Whitaker
Contributor: Josh Levine
Contributor: Shankar Sastry
Developer: Brig Bagley

Building Cleaver2

Requirements: Git, CMake, Qt4 -OR- Qt5
Optional Requirements: SCIRun4 (For segmentation tools) Suggested: QtCreator cross-platform IDE
We recommend building cleaver outside of the source tree.
From Cleaver2 directory:

Linux, OSX

mkdir build
cd build
cmake ../src
make

NOTE: You may need to set your Qt build variables:

cmake -DQt5Widgets_DIR="/usr/lib/Qt/5.3.0/gcc/lib/cmake/Qt5Widgets" -DQt5OpenGL_DIR="/usr/lib/Qt/5.3.0/gcc/lib/cmake/Qt5OpenGL"../src 

Windows

Additional requirements for GUI: glew (http://glew.sourceforge.net/) -OR- Qt5 and glext (http://sourceforge.net/projects/glextwin32/)
From Developer Command Prompt: (e.g. Visual Studio 10 (32bit))
mkdir build
cd build
cmake ../src
nmake

NOTE: If you do not have your development environment paths set up, you can set them with cmake-gui, qt-creator, or pass library paths directly to command line like below:

For Qt 4
```bash cmake -G "NMake Makefiles" -DGLEW_LIBRARY="C:\glew\glew-1.10.0\lib\Release\Win32\glew32.lib" -DGLEW_INCLUDE_DIR="C:\glew\glew-1.10.0\include" -DQT_QMAKE_EXECUTABLE="C:\Qt\4.8.5\bin\qmake.exe" -DQT_VERSION="4" ..\src ```
For Qt 5
```bash cmake -G "NMake Makefiles" -DGLEXT_LIBRARY="C:\glext\glext\lib\glext.lib" -DGLEXT_INCLUDE_DIR="C:\glext\glext\include" -DQt5Widgets_DIR="c:\Qt\5.3.0\5.3\msvc2010_opengl\lib\cmake\Qt5Widgets" -DQt5OpenGL_DIR="c:\Qt\5.3.0\5.3\msvc2010_opengl\lib\cmake\Qt5OpenGL" -DQT_VERSION="5" ..\src ```

NOTE: To include Segmentation Tools in your build, you must set your SCIRun4 directory:

cmake -DSCIRun4_DIR="/Path/To/SCIRun" ../src

**NOTE**: Since the segmentation tools make system calls, it is important that you provide the full path to the segmentation file (not a relative path).

Using Cleaver2

Inside of your build directory:
bin/cleaver-gui
Or, for the command line tool:
bin/cleaver-cli --help
For a list of command line tool options.

    Command line flags:
      -h [ --help ]            display help message
      -v [ --verbose ]         enable verbose output
      --version                display version information
      --material_fields arg    material field paths
      --background_mesh arg    input background mesh
      --mesh_mode arg          background mesh mode
      --mesh_improve           improve background quality
      --alpha arg              initial alpha value
      --alpha_long arg         alpha long value for regular mesh_mode
      --alpha_short arg        alpha short value for regular mesh_mode
      --sizing_field arg       sizing field path
      --grading arg            sizing field grading
      --multiplier arg         sizing field multiplier
      --scale arg              sizing field scale
      --padding arg            volume padding
      --accelerate             use acceleration structure
      --write_background_mesh  write background mesh
      --strip_exterior         strip exterior tetrahedra
      --output_path arg        output path prefix
      --output_name arg        output mesh name
      --output_format arg      output mesh format
      --strict                 warnings become errors

Testing

The repo comes with a set of regression tests to see if recent changes break expected results. To build the tests, you will need to set BUILD_TESTING to "ON" in either ccmake or when calling CMake:

cmake -DBUILD_TESTING=ON ../src

Windows

The gtest library included in the repo needs to be built with forced shared libraries on Windows, so use the following:
cmake -DBUILD_TESTING=ON -Dgtest_forced_shared_crt=ON ../src

Be sure to include all other necessary CMake definitions as annotated above.

Known Issues

  • On larger data sets with a potentially high number of quadruple points (> 3 material fields), some functions are failing to ensure valid tets and meshes, causing bad tets in the final output. This code is being debugged now for a future release.

About

A MultiMaterial Tetrahedral Meshing Library and Application

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 67.0%
  • C 27.7%
  • Makefile 4.6%
  • CMake 0.4%
  • Shell 0.2%
  • GLSL 0.1%