A C++ library implementation of full automatic tool for 3D Meshing.
3DMesher can create a Tet-mesh or Hex-mesh using CGAL library.
3DMesher generates a Tet-mesh using CGAL implementation of Delaunay algorithm.
3DMesher generates a Hex-mesh using Univaq Hex mesh or Univaq Split from Tet algorithm.
- clang++ 10.0 or higher or an equivalent compiler (gcc/g++ 9.x or higher)
- C++ 20
- CMake 3.16 or newer
- CGAL library 5.1 (https://www.cgal.org/releases.html)
- Verdict library(https://gitlab.kitware.com/verdict/verdict/-/tree/master)
- VTK library (https://gitlab.kitware.com/vtk/vtk.git)
-
on Ubuntu:
sudo apt-get install libcgal-dev
-
on MAC:
-
brew install cgal
-
brew install cgal-qt5
-
Export path:
If you need to have qt first in your PATH run:
echo 'export PATH="/usr/local/opt/qt5/bin:$PATH"' >> /Users/userName/.bash_profile
For compilers to find qt you may need to set:
export LDFLAGS="-L/usr/local/opt/qt/lib"
export CPPFLAGS="-I/usr/local/opt/qt/include"
For pkg-config to find qt you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/qt/lib/pkgconfig"
-
brew link cgal
-
brew link qt5 --force
-
To build with CMake after downloading Verdict library follow https://gitlab.kitware.com/verdict/verdict/-/blob/master/readme.md instructions:
- Set up a build directory
- Change to this directory
- Type
ccmake /path/to/verdict
but replace/path/to/verdict
with the path to the directory containing this read-me file. - Fill the required fields and press the 'c' key NB: This process is iterative; you may need to change values and reconfigure before continuing.
- When the 'g' option becomes available, press the 'g' key to generate the Makefile and exit CMake.
- Build with
make
- Install with
make install
To buid VTK library follow https://vtk.org/Wiki/VTK/Building instructions.
-
From terminal, move to the 3DMesher directory
-
Open CMakeLists.txt file, comment all set(SOURCE_FILES fileName.cpp) instructions; decomment
set(SOURCE_FILES UnivaqHexMeshMain.cpp)
-
Create a build folder
mkdir build
-
Navigate to the newly build folder
cd build
-
Type
cmake ..
-
Type
make
ormake -j6
To use the executable:
-
Open terminal
-
Move to the build directory
-
Type
./3DMesher path/to/the/STLfile/filename.stl path/to/the/output/filename.vtk resolution
or
./3DMesher path/to/the/STLfile/filename.stl path/to/the/output/filename.mesh resolution
Example:
./3DMesher ../DataInput/bolt.stl ../MeshOutput/bolt.mesh 8
-
From terminal, move to the 3DMesher directory
-
Open CMakeLists.txt file, comment all set(SOURCE_FILES fileName.cpp) instructions; decomment
set(SOURCE_FILES DelaunayTetMeshMain_Hex.cpp)
-
Create a build folder
mkdir build
-
Navigate to the newly build folder
cd build
-
Type
cmake ..
-
Type
make
ormake -j6
To use the executable:
-
Open terminal
-
Move to the build directory
-
Type
./3DMesher path/to/the/STLfile/filename.stl path/to/the/output/filename.vtk edge_dimension
or
./3DMesher path/to/the/STLfile/filename.stl path/to/the/output/filename.mesh edge_dimension
Example:
./3DMesher ../DataInput/bolt.stl ../MeshOutput/bolt.mesh 8
-
From terminal, move to the 3DMesher directory
-
Open CMakeLists.txt file, comment all set(SOURCE_FILES fileName.cpp) instructions; decomment
set(SOURCE_FILES DelaunayTetMeshMain.cpp)
-
Create a build folder
mkdir build
-
Navigate to the newly build folder
cd build
-
Type
cmake ..
-
Type
make
ormake -j6
To use the executable:
-
Open terminal
-
Move to the build directory
-
Type
./3DMesher path/to/the/STLfile/filename.stl path/to/the/output/filename.mesh edge_dimension
Example:
./3DMesher ../DataInput/bolt.stl ../MeshOutput/bolt.mesh 8
- Install Doxygen
- Move to docs_doxygen directory
- Type
doxygen Doxyfile.in
- Install Doxygen, Sphinx and Breathe
- Move to docs_sphinx directory
- Create _build directory
- Create _static directory
- Create _templates directory
- Type
make html
from docs_sphinx directory
- Claudia Di Marco
- Riccardo Mantini