Python implementation of the SRF approach to hexahedral meshing. (Work in Progress)
- The final volume parametrization step is not working (linear mixed-integer CG).
- Edge collapse adjustments need to be implemented.
- Move numerical optimizations to CUDA.
- Back-propagation to compute gradients in L-BFGS, hopefully improve runtime.
- Maybe run additional smoothing on surface cross-field.
Inputs : Triangle mesh as .stl (binary)
Given an input triangle mesh, a tetrahedral mesh is generated (using TetGen) and its boundary surface is extracted. The vertex-based curvatures and normals of the boundary surface are computed, as well as other topological information. A 3D frame is initialized at the centroid of each tetrahedron. The frame field smoothness is optimized by minimizing a non-linear energy function, solved using the efficient L-BFGS method. Moreover, some case-by-case adjustments are made to ensure the field is singularity-restricted. After the optimization, a volume parametrization is fit to the framefield as an atlas of linear maps defined on the vertices, using a CG (Conjuate Gradient) method. The hexahedral mesh is extracted based on the integer isosurface intersections.
Outputs: Saved to disk as .vtk files, which can be viewed in Paraview. This includes tetrahedral mesh, curvature cross-field, optimized 3D frame field, singular graph and the hexahedral mesh.
State of the Art
A non-exhaustive list of papers that inspired this implementation.
- All-Hex Meshing using Singularity-Restricted Field
- CubeCover - Parameterization of 3D Volumes
- Boundary Aligned Smooth 3D Cross-Frame Field
- General Planar Quadrilateral Mesh Design Using Conjugate Direction Field
- QuadCover - Surface Parameterization using Branched Coverings
- Estimating Curvatures and Their Derivatives on Triangle Meshes
- Trivial Connections on Discrete Surfaces
Python 3, and set up other dependencies with:
pip install requirements.txt