Skip to content

inlet and outlet text files for fab#65

Merged
zasexton merged 4 commits intoSimVascular:mainfrom
zasexton:main
Mar 14, 2026
Merged

inlet and outlet text files for fab#65
zasexton merged 4 commits intoSimVascular:mainfrom
zasexton:main

Conversation

@zasexton
Copy link
Contributor

Current situation

This PR adds optional inlet/outlet root sidecar exports for spline files generated from trees and
forests in the GUI.

The existing spline export writes sampled spline points, but it does not provide a companion file
that identifies which root connection points should be treated as inlets or outlets for downstream
fabrication or perfusion workflows. This PR extends the export flow without changing the default
behavior: sidecar export is opt-in, tree exports require an explicit root role, and forest exports
use explicit per-network inlet tree indices so each generated spline file gets a matching
*_inlet_outlet.txt file.

Related issue / discussion: add link here if there is an existing upstream issue or discussion for
spline inlet/outlet sidecar export.

Release Notes

  • Add optional spline inlet/outlet root sidecar exports via *_inlet_outlet.txt.
  • Extend the GUI spline export dialog to collect tree root role for single-tree exports and per-
    network inlet tree indices for forest exports.
  • Add connected-forest sidecar mapping so each exported spline file receives the correct inlet/
    outlet root points.
  • Add regression coverage for tree, unconnected forest, connected two-tree forest, connected three-
    tree forest, and invalid sidecar input cases.
  • No breaking changes. Existing spline export behavior is unchanged unless sidecar export is
    explicitly enabled.

Documentation

The spline export dialog now includes an optional root sidecar export path. Documentation should
describe:

  • the new Export inlet/outlet root sidecar option in the GUI
  • the *_inlet_outlet.txt filename convention
  • the sidecar file format:
    • inlet
    • x, y, z
    • outlet
    • x, y, z
  • how tree exports use a single explicit root role
  • how forest exports use per-network inlet tree indices, with unlabeled trees treated as outlets

Testing

This change adds and updates regression tests in test/test_spline_export_files.py to cover:

  • tree export with inlet sidecar
  • tree export with outlet sidecar
  • missing tree root role when sidecar export is enabled
  • unconnected forest export with one sidecar per tree file
  • connected two-tree forest sidecar output
  • connected three-tree forest component-to-tree sidecar mapping
  • invalid inlet tree index validation

Local verification:

  • pytest -q test/test_spline_export_files.py

Please ensure the full GitHub Actions test matrix also passes for this change.

Code of Conduct & Contributing Guidelines

@zasexton zasexton self-assigned this Mar 14, 2026
@zasexton zasexton merged commit 5950c0b into SimVascular:main Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant