Skip to main content

stentFIT

Documentation Status

Semi-automated virtual stent implantation with mixed-dimensional modelling

Full documentation, including the API reference and workflow diagrams, is hosted at stentfit.readthedocs.io.

stentFIT turns a stent surface mesh (.stl) into a 1D beam-element model ready for beam-to-solid contact simulation. It samples the stent surface, detects its rings, extracts a 2D skeleton per ring, wraps that skeleton back onto the 3D mid-surface, fits a B-spline to each strut curve, and meshes the result into Simo–Reissner beams with BeamMe. Extracting the stent's 1D wireframe is a semi-automated process: it allows manual edits of intermediate steps such as ring detection and 2D skeletonisation. It also provides a smoke test that verifies the quality of the 1D stent model inside a generated pipe-like 3D vessel.

Installation

pip install stentfit

Requires Python 3.13 (pinned to match BeamMe's supported range). Core dependencies such as beamme (stent beam meshing and artery solid meshing), gmsh (artery solid meshing), and fourcipp are installed automatically. Running the generated simulation input files additionally requires a compiled 4C executable, which is not included in this package.

What it does & How to use it

1. Stent skeletonisation (examples/stent_skeleton.ipynb)

  • Sample a point cloud from the stent STL and align it to its centreline axis.
  • Detect rings and skeletonise each ring in 2D (optional auto-tuning + manual edits).
  • Wrap the 2D skeleton onto the local mid-surface, clean up the graph, and fit a B-spline per strut.
  • Mesh the fitted splines into a 1D Simo–Reissner beam mesh with BeamMe.

Each stage writes skeleton_points.csv, skeleton_splines.json, stent_features.json, and interactive HTML views into the output directory.

Unrolled 2D skeleton with per-ring tuning diagnostics

2. Test artery generation & simulation setup (examples/test_sim_generation.ipynb)

A synthetic/parametric smoke test exercises the full mixed-dimensional chain end-to-end:

  • Generate a parametric test artery (straight / curved / S-bend) sized to the stent, and mesh its wall as a 3D solid with GMSH.
  • Warp the stent beam mesh onto the artery centreline.
  • Check beam-to-solid coupling compatibility (stiffness ratio, element-size ratios) and visualize the stent inside the artery via Paraview.
  • Tie the beam mesh to the artery lumen and write a schema-validated 4C simulation input file with a quasi-static radial expansion load.

This confirms the stent-to-artery mapping and 4C input generation work end-to-end, using placeholder materials and tied meshtying rather than real contact such as full deployment physics (contact, HGO-C artery material, elasto-plastic beam bending) is planned but not yet implemented.

Stent beam mesh warped into a curved artery, viewed in ParaView

License

stentfit was created by Vural Aktas. It is licensed under the terms of the MIT license.

Contributing

Interested in contributing? Reach out at vural.aktas@rwth-aachen.de.

Credits

stentfit was created with cookiecutter and the py-pkgs-cookiecutter template.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stentfit-0.1.0.tar.gz (83.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stentfit-0.1.0-py3-none-any.whl (90.3 kB view details)

Uploaded Python 3

File details

Details for the file stentfit-0.1.0.tar.gz.

File metadata

  • Download URL: stentfit-0.1.0.tar.gz
  • Upload date:
  • Size: 83.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.5.0

File hashes

Hashes for stentfit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c8343e7005f31b6681b8f345e2819f96b655e89ccd019cb300a27943be861d5b
MD5 06f48ec8efe10b467e0cea87281b618b
BLAKE2b-256 f55ac43f4e0a26db1196d6e87a3f858415aeab4e51355ad42c57e5bc76f48891

See more details on using hashes here.

File details

Details for the file stentfit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stentfit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 90.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.5.0

File hashes

Hashes for stentfit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e81605770c4396f38e49d89aad7cd04ac550112bbe584feb5a414c2e9a965256
MD5 f38f10fffaeb205e5322d93710caabf7
BLAKE2b-256 7fca99a971b87a42f6e3bb15911ce408817152e4cf527da02909fd3db8f6d39c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page