How msraig/ce-polycube works
Project type and purpose
• This is a research-grade C++ command‐line meshing pipeline (“CE-PolyCube”), producing feature‐aware all‐hex meshes from tetrahedral inputs by combining PolyCube deformation, cut‐enhancement, and hex‐element optimization.
• The README describes a data‐processing pipeline driven by Windows batch scripts and multiple compiled executables, leveraging external libraries (Boost, CGAL, MOSEK, etc.) and in‐repo modules (HexOptimizer, ScissorPoly, PolyCubeCut, various Utils).
File structure
• Top‐level folders:
• Bin – prebuilt executables (HexaConvert.exe, ScissorPoly.exe, etc.)
• HexOptimizer – library + driver code for hex‐mesh smoothing/refinement
• PolyCubeCut – implements cut‐enhanced polycube map logic
• ScissorPoly – code for initial polycube deformation and flattening
• Utils – small standalone tools (SplitTet, TetHexFeatureTransfer, format converters)
• Scripts – orchestration scripts (gen_hex.bat, gen_hex_nodeform.bat)
• extern & cmake – vendored external dependencies and CMake find scripts
• Build orchestrated by CMakeLists.txt in root and subdirectories; finds external libs, builds modules into executables under Bin.
README for additional insights
• Pipeline stages:
a. Start from tetrahedral mesh (.vtk) + feature file (.fea).
b. Run ScissorPoly to deform/flatten initial PolyCube.
c. Run PolyCubeCut to perform cut‐enhancement.
d. Run HexOptimizer to optimize final all‐hex mesh.
e. Utility tools convert between formats (VTK→OBJ, etc.).
• Batch scripts glue executables together and set environment variables (DATA_ROOT_PATH, HEXEX_PATH, POLYCUT_PATH).
Detailed capture of essential architectural elements
• Be explicit about data formats (input .vtk + .fea, output .vtk).
• Role of batch scripts in configuring and chaining stages.
• CMake as a component that resolves and links all modules and externals into binaries.
• Optional flows (e.g., gen_hex_nodeform.bat using PolyCut directly, alternative parameter tuning).