RespGeomLib: A Reproducible Parametric Engine for Generating Analysis-Ready Human Airway Lumen Geometry

Nichula Wasalathilaka, Parakrama Ekanayake, Roshan Godaliyadda

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.

RespGeomLib pipeline from YAML specification to Pipe, Y2, and Y3 primitives, smooth blended junction, procedural airway tree, and CFD output.
RespGeomLib generates smooth, editable, analysis-ready airway lumen geometry from compact YAML specifications.

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.

Overview of the RespGeomLib pipeline: local coordinate transform, implicit surface evaluation, marching cubes and clipping, output 3D airway.
Port-based assembly and local implicit extraction pipeline.

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.

RespGeomLib primitive building blocks including Pipe, Y2 bifurcation, and Y3 trifurcation primitives.
Reusable Pipe, Y2, and Y3 primitives for airway tree assembly.

Core Technical Idea

\[ \phi(x) = -\frac{1}{\kappa} \log\left( \sum_{i=1}^{N} e^{-\kappa \phi_i(x)} \right) \]

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.

Interactive browser preview of RespGeomLib-generated airway lumen meshes: baseline, stenotic, and dilated variants.

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.

Junction-quality comparison between a Boolean/stitch baseline and RespGeomLib.
MethodLoopsNon-manifoldPlanarity (max)Cap OKCells
Boolean/stitch3 65.9796no7213
RespGeomLib3 00.0010yes63436

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.

Runtime and memory comparison between local and global implicit extraction.
DepthBranchesLocal RT (s)Global RT (s)Speed-upL-Mem (MB)G-Mem (MB)Mem×
130.0745.64076.7×135.4150.51.11×
270.18537.358201.8×136.7165.11.21×
3150.420117.519279.8×140.6183.91.31×

Controlled variants and CFD export

Implicit Y-junction with parametric stenosis and dilation variants.
Controlled stenosis/dilation variants generated from a shared base specification.
CFD demonstration on a RespGeomLib Y-junction: exported surface, volume mesh, velocity, pressure, and particle traces.
CFD usability demonstration using a RespGeomLib Y-junction in SimScale.

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.

Demo Coming Soon

Code

The RespGeomLib codebase is publicly released to support reproducible airway geometry generation, controlled synthetic variant creation, and CFD-ready export.

GitHub Repository

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}
}