How bastiensauty/cornea_meshing_package works
cornea is a Python tool for turning corneal surface parameters into a structured, tagged Gmsh mesh with per-element orientation vectors. Its main workflow loads parameters, constructs the two-conic geometry and square-to-cornea map, samples mesh nodes and element frames, exports and reads back the mesh, then checks the frames and produces plots. The package also exposes geometry and displacement APIs for Python callers. The CLI wiring is sampled; some mesh I/O implementation details are excerpted, so the graph avoids inferring internal calls beyond documented behavior.
Main entry points: __main__.py CLI workflow · jacobian.py Frame readback · plots.py Plot generation · mesh_io.py Element frames
Components 16
Inputs and CLI
- CLI workflow
cornea/__main__.py - Parameters
cornea/params.py
Corneal geometry
- Conic geometry
cornea/geometry.py - Coons map
cornea/geometry.py - Displacement API
cornea/geometry.py
Mesh and frames
- Grid nodes
cornea/mesh_io.py - Element frames
cornea/mesh_io.py - Frame transforms
cornea/jacobian.py - Gmsh writer
cornea/mesh_io.py
Readback and outputs
- Tagged Gmsh mesh
- Mesh reader
cornea/mesh_io.py - Frame readback
cornea/jacobian.py - Frame diagnostics
cornea/jacobian.py - Plot generation
cornea/plots.py - Mesh and field plots
Other components
- User
Connections 23
- User → CLI workflow: runs
- CLI workflow → Parameters: loads JSON
- Parameters → CLI workflow: returns settings
- CLI workflow → Conic geometry: constructs
- Conic geometry → Coons map: defines boundaries
- CLI workflow → Grid nodes: builds grid
- Grid nodes → Coons map: samples map
- CLI workflow → Element frames: computes frames
- Element frames → Coons map: evaluates Jacobian
- Element frames → Frame transforms: pushes directions
- CLI workflow → Gmsh writer: exports mesh
- Gmsh writer → Tagged Gmsh mesh: writes mesh
- CLI workflow → Plot generation: plots nodes
- Plot generation → Mesh and field plots: writes figures
- CLI workflow → Mesh reader: reads mesh
- Tagged Gmsh mesh → Mesh reader: provides data
- Mesh reader → Frame readback: provides mesh
- CLI workflow → Frame readback: extracts frames
- CLI workflow → Frame diagnostics: checks frames
- Frame readback → Frame diagnostics: supplies vectors
- CLI workflow → Plot generation: plots readback
- Frame readback → Plot generation: supplies fields
- CLI workflow → Displacement API: exposes API