RespGeomLib: A Reproducible Parametric Engine for Generating Analysis-Ready Human Airway Lumen Geometry
University of Peradeniya, Sri Lanka
IEEE MERCon 2026 · Accepted Paper
RespGeomLib converts compact airway specifications into smooth, editable, port-defined, and CFD-ready 3D lumen meshes.
Overview
RespGeomLib is a lightweight parametric geometry engine for creating smooth, editable human airway lumen meshes from compact YAML specifications. Instead of relying on noisy CT segmentation alone or stitching tube primitives with hard seams, it combines port-based assembly, smooth implicit junction blending, and local mesh extraction around bifurcations. The result is a reproducible workflow for generating airway geometries that are suitable for morphometry, controlled synthetic variants, and downstream CFD preparation.
Why this matters
Airway geometry is central to pulmonary morphometry and airflow simulation, but generating clean analysis-ready airway surfaces remains difficult. CT-derived models can be fragmented or noisy near distal branches, while simple procedural models often introduce seams and poorly defined boundary ports. RespGeomLib targets the space between these approaches: reproducible enough for controlled studies, but geometrically clean enough for downstream analysis.
How RespGeomLib Works
RespGeomLib starts from a compact YAML file describing airway primitives, branch parameters, and parent-child attachments. Each primitive exposes explicit ports, allowing the tree to be assembled deterministically through local-to-world coordinate transforms. Straight and tapered airway segments remain analytic, while bifurcations and trifurcations are generated locally using smooth implicit blending and marching cubes. The final mesh is clipped and cleaned to preserve open inlet and outlet boundaries.
- Specify: define Pipe, Y2, and Y3 blocks in YAML.
- Assemble: attach primitives using explicit inlet/outlet ports.
- Blend: create smooth junctions using an implicit soft union.
- Extract: run local marching cubes only near junctions.
- Export: produce cleaned meshes for analysis and CFD preparation.
Reusable airway primitives
The engine currently supports straight or tapered pipes, two-way bifurcations, and three-way junctions. These primitives can be combined hierarchically to form reproducible airway trees.
Core Technical Idea
Instead of joining tube surfaces by Boolean stitching, RespGeomLib forms a smooth implicit union of branch fields. The blend parameter \(\kappa\) controls how sharply or smoothly branch surfaces merge, producing lumen-continuous bifurcations without internal walls.
Interactive 3D Geometry Preview
RespGeomLib exports analysis-ready airway lumen meshes that can be inspected directly in the browser. The examples below show a baseline geometry and controlled stenosis/dilation variants generated from the same parametric framework.
Reference airway geometry generated from the base RespGeomLib specification.
3D model preview could not be loaded.
Large meshes may take a few seconds to load depending on network speed.
Evidence
The current release is supported by three types of evidence: geometric quality checks, computational scaling, and downstream CFD usability.
Cleaner junction geometry
A matched Y2 junction benchmark compares a Boolean/stitch baseline with the RespGeomLib smooth-min formulation. RespGeomLib preserves the intended open ports while eliminating non-manifold edges and improving port planarity.
| Method | Loops | Non-manifold | Planarity (max) | Cap OK | Cells |
|---|---|---|---|---|---|
| Boolean/stitch | 3 | 6 | 5.9796 | no | 7213 |
| RespGeomLib | 3 | 0 | 0.0010 | yes | 63436 |
Efficient local extraction
Because implicit extraction is localized around junctions, RespGeomLib avoids whole-tree voxelization. In balanced Y2 trees, local extraction was substantially faster and used less peak memory than global implicit extraction.
| Depth | Branches | Local RT (s) | Global RT (s) | Speed-up | L-Mem (MB) | G-Mem (MB) | Mem× |
|---|---|---|---|---|---|---|---|
| 1 | 3 | 0.074 | 5.640 | 76.7× | 135.4 | 150.5 | 1.11× |
| 2 | 7 | 0.185 | 37.358 | 201.8× | 136.7 | 165.1 | 1.21× |
| 3 | 15 | 0.420 | 117.519 | 279.8× | 140.6 | 183.9 | 1.31× |
Controlled variants and CFD export
Localized radius modulation supports matched stenotic and dilated variants from the same base geometry. Exported RespGeomLib geometries were also meshed and simulated in SimScale, with stable steady incompressible convergence and a slightly asymmetric outlet flow split (46.5% vs. 53.5%).
Browser Demo — Coming Soon
A lightweight browser demo is being prepared for editing airway parameters, previewing generated geometry, and exporting meshes. The current release focuses on the accepted paper, reproducible code, and interactive inspection of generated STL meshes.
Code
The RespGeomLib codebase is publicly released to support reproducible airway geometry generation, controlled synthetic variant creation, and CFD-ready export.
The same YAML-style specification used in the paper can be edited to generate new airway configurations.
A minimal airway specification:
- id: trachea
kind: pipe
L: 12.0
d: [1.8, 1.6] # inlet, outlet diameter
- id: main_bifurcation
kind: y2
parent: trachea
port: 0
L: [9.0, 9.0]
d: [1.3, 1.1]
theta: [28, 32] # child elevation angles (deg)
blend: 2.0 # smooth-min sharpness (kappa)
Limitations
RespGeomLib is a reproducible geometry-generation engine, not a patient-specific airway reconstruction method. The current release focuses on idealized lumen geometries, circular cross-sections, and a limited set of primitive junction types. Broader anatomical variability, non-circular cross-sections, wall thickness, and larger CFD validation studies remain future work.
Citation
@inproceedings{wasalathilaka2026respgeomlib,
title={RespGeomLib: A Reproducible Parametric Engine for Generating
Analysis-Ready Human Airway Lumen Geometry},
author={Wasalathilaka, Nichula and Ekanayake, Parakrama and Godaliyadda, Roshan},
booktitle={IEEE MERCon},
year={2026}
}