CGFoil
CGFoil is a CGAL-based airfoil meshing tool for generating constrained Delaunay triangulations of airfoils with plies and webs.
Installation
Install with uv:
uv pip install .Usage
CLI help
Generate mesh from YAML:
cgfoil mesh examples/airfoil_mesh.yaml -o mesh.pklPlot existing mesh:
cgfoil plot mesh.pkl -f plot.png -sExport to VTK:
cgfoil export vtk mesh.pkl -o output.vtkExport to ANBA:
cgfoil export anba mesh.pkl -o output.jsonRun with defaults:
cgfoil run -p -v output.vtk -f naca0018.dat -sOptions:
-p, --plot: Plot the triangulation-v, --vtk FILE: Output VTK file-f, --file FILE: Path to airfoil data file (.dat), default: naca0018.dat-s, --split: Enable split view plotting--plot-file FILE: Save plot to file
Examples
See the examples/ directory for programmatic usage, including loading from YAML.
Example output

Development
Use uv for dependency management:
uv syncRun tests:
uv run pytestFormat code:
uv run ruff formatLint:
uv run ruff check