Mesher is a hydrology-focused, multi-objective unstructured mesh generator. It takes a DEM plus optional feature constraints (streams, landcover, etc.), preprocesses inputs with GDAL, and generates a variable resolution triangular mesh with quality controls (e.g., Lloyd optimization and tolerance checks). Output formats include shapefiles and VTK/VTU, with helper tools for conversions and mesh stats.
- Python CLI and pipeline:
src/mesher/mesher_cli.pyreads a user config file, prepares raster/vector inputs with GDAL, and drives the mesh workflow. - C++ core:
src-cxx/builds themesherexecutable that performs the actual triangulation and tolerance checks (uses GDAL, CGAL, Boost). - Utilities and tools:
src/mesher/tools/contains converters and analyzers (mesh2shp,mesh2vtu,meshmerge,meshpermutation,meshstats).
- CLI entry points are declared in
pyproject.tomlunder[project.scripts]. - Main user flow is
mesher(Python), which expects a config file path. - The config reader (
read_configinsrc/mesher/mesher_cli.py) documents required options such asdem_filenameandmax_area, plus optional constraints and smoothing behavior.
- Build uses
scikit-build-core+ CMake to compile the C++ core. - Runtime dependencies include GDAL, VTK, CGAL, Boost, METIS, MPI (see
pyproject.tomland README). - There are example/test scripts in the repo root (e.g.,
test.py,test-sub.py) and docs indocs/.