AlgoHex is an implementation of the frame based hexahedral meshing pipeline, distributed under AGPLv3.
If you use AlgoHex in your scientific work, please cite us.
@article{liu2023locally,
title={Locally Meshable Frame Fields},
author={LIU, HENG and BOMMES, DAVID},
journal={ACM Trans. Graph},
volume={42},
number={4},
year={2023}
publisher = {ACM},
address = {New York, NY, USA},
doi = {10.1145/3592457}
}
AlgoHex automatically converts tetrahedral meshes to hexahedral meshes. The complete pipeline consists of four major steps (see the figure below): initialization of feature-aligned smooth frame field, locally meshable frame field generation, parameterization, and hexahedral mesh extraction. The frame field initialization follows the approach of On Smooth 3D Frame Field Design. Locally meshable frame field is obtained via the state-of-the-art method Locally Meshable Frame Fields. Parameterization of the frame field includes seamless mapping (Locally Meshable Frame Fields, CubeCover), robust quantization (QGP3D) and Integer-grid mapping. For hexahedral mesh extraction, we use the libHexEx.

The input to the algorithm is a tetrahedral mesh with user-specified feature tags, and the output is a hexahedral mesh. The input tetrahedral mesh can be in VTK v2.0 (ASCII) or OpenVolumeMesh file format. A typical dataset with feature tags as the input to AlgoHex is HexMe. The output hexahedral mesh is in OpenVolumeMesh file format. Note that the result may be an incomplete hexahedral mesh, as the frame field may not be globally hex-meshable.
The CMake-based build system will automatically download missing dependencies unless ALGOHEX_DOWNLOAD_MISSING_DEPS is disabled (enabled by default if building AlgoHex standalone, disabled if built inside a bigger project using add_subdirectory). All dependencies are listed below:
- OpenVolumeMesh
- libHexEx
- CoMISo
- GMM
- TinyAD
- QGP3D (Dependencies of QGP3D have to be installed on your system. Either Coin-OR Bonmin or the commercial solver Gurobi are recommended)
- Eigen
- CLI11
- IPOPT (Manually install on your system, macOS:
brew install ipopt, Linux:sudo apt-get install coinor-libipopt-dev) - SuiteSparse (optional)
- googletest (optional, for unit tests)
AlgoHex can be compiled independently, resulting in a command-line tool, or compiled together with OpenFlipper. To compile the standard alone, follow the steps:
cd AlgoHex
mkdir build
cd build
cmake ..
make
We supply a Dockerfile that can be used to compile in a known environment. You can use Docker or podman.
Example:
podman build --memory 64G -t algohex .
podman run --rm --memory 64G --volume .:/work algohex HexMeshing -i /work/demo/HexMeshing/cylinder.ovm -o /work/demo/HexMeshing/cylinder_hex.ovm 2>&1 | tee cyl.log
Note: Compiling (and running) AlgoHex requires non-trivial amounts of memory. If you are using Docker/Podman on a non-Linux platform, where a VM is created to run Linux containers, you may have to increase the memory available to the VM (e.g. podman machine). For podman, this can be accomplished by stopping and deleiting the default machine (if it exists), and creating a new one using podman machine init --memory 16384 --now.
AlgoHex is copyright (C) 2019-2025 by David Bommes (see the CREDITS file for more information). AlgoHex is free software under the GNU Affero General Public License. For more detailed license information, see LICENSE in the AlgoHex root directory.
A command-line executable is provided, which reads a tetrahedral mesh and outputs a hexahedral mesh. For example:
./Build/bin/HexMeshing -i ../demo/HexMeshing/cylinder.ovm -o /path/to/cylinder_hex.ovm
Two modes of the hexahedral meshing pipeline are available in AlgoHex. The default mode includes all four major components of frame field based hexahedral meshing pipeline, while the mode --hexme-pipeline comprises only a subset as described in HexMe.
For more information on the usage, please execute ./Build/bin/HexMeshing -h.
