Stent skeletonisation
Extracts the 1D wireframe (skeleton) of a stent design from its 3D STL
surface mesh. Stent(...).skeletonize() runs the whole thing; the three
phases are also callable on their own, which is what you want when a ring
needs fixing by hand. Every stage writes an inspectable intermediate
(CSV + Plotly HTML) into the output folder.
from stentfit import Stent
STENT_NAME = "stent01"
STL_FILE = f'/Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/input/stent_designs/{STENT_NAME}.stl'
OUTPUT_DIR = f'/Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton/{STENT_NAME}'
# Tuning parameters are constructor arguments: set once, held on the object.
stent = Stent(
stl_file=STL_FILE,
stent_name=STENT_NAME,
output_dir=OUTPUT_DIR,
random_seed=0,
remove_supports=(STENT_NAME == "16crownCrimpedXienceStent+extremaSupports"),
auto_tune=True,
pixels_per_strut=10,
dilate_px=3,
tune_time_limit=120,
)
# One call: sample → detect rings → 2D-skeletonise → (prompt for manual edits) →
# wrap to 3D → clean the graph → fit splines. It returns the same object, so you
# can keep working with `stent` afterwards.
stent.skeletonize()
'''# Or: phase by phase
stent = Stent(str(STL_FILE), STENT_NAME, str(OUTPUT_DIR))
stent.skeletonize_2d() # sample -> rings -> per-ring 2D skeleton + checkpoint
stent.edit_and_assemble() # manual 2D fixes -> one assembled flat skeleton
stent.finalize() # wrap to 3D -> clean graph -> fit splines
# after a kernel restart, pick straight back up from the checkpoint:
stent = Stent.load(str(OUTPUT_DIR))
stent.edit_and_assemble().finalize()'''
[output] wiped and reusing /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01
Loaded mesh: /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/input/stent_designs/stent01.stl
[preanalysis] size_ratio=5.70, length=18.09 mm -> target_samples=1,000,000
[preanalysis] mesh faces=18,244 -> auto n_samples=1,824,400
[preanalysis] sampling 1,824,400 points (auto)
[plot] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/thickness_diagnostics.html (inspect the strut thickness)
[plot] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/sampling_points.html (inspect the sampled point cloud)
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/sampling_points.csv (1,824,400 points)
Detected 10 rings (auto-detected).
[plot] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/ring_assignment.html
[plot] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/ring_dips.html
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/ring_points.csv
[segmentation] 10 rings x 3 pieces -> 30 z-slices
[segmentation] 200 regions are found
Skeletonising 10 rings (auto-tune)...
===== ring_01 (1/10) — 244,889 pts, band z=[-9.0482, -7.3746] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.0
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.2
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.3
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.6
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 0.8
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.1
7 45.00 3 | 0 3 0.00 | 30.000 76.776 106.776 | 1.5
8 45.00 4 | 0 0 0.00 | 0.000 82.358 82.358 | 1.9
9 50.00 4 | 0 0 0.00 | 0.000 80.475 80.475 | 2.5
10 55.00 4 | 0 4 0.00 | 40.000 78.614 118.614 | 3.2
11 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 4.0
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=40.00 dilate_px=3 total_error=79.232 (defect=0.000, quality=79.2323; conn=0, loop=0, empty=0.00)
ring_01: 6,643 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_01.html
===== ring_02 (2/10) — 324,646 pts, band z=[-7.3746, -5.5652] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.1
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.3
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.4
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.7
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 1.0
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.4
7 45.00 3 | 0 4 0.00 | 40.000 76.776 116.776 | 1.8
8 45.00 4 | 0 0 0.00 | 0.000 82.358 82.358 | 2.4
9 50.00 4 | 0 0 0.00 | 0.000 80.475 80.475 | 3.2
10 55.00 4 | 0 5 0.00 | 50.000 78.614 128.614 | 4.2
11 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 5.4
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=40.00 dilate_px=3 total_error=79.232 (defect=0.000, quality=79.2323; conn=0, loop=0, empty=0.00)
ring_02: 7,017 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_02.html
===== ring_03 (3/10) — 340,832 pts, band z=[-5.5652, -3.6654] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.1
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.3
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.4
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.7
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 1.0
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.4
7 45.00 3 | 0 2 0.00 | 20.000 76.776 96.776 | 1.9
8 45.00 4 | 0 0 0.00 | 0.000 82.358 82.358 | 2.5
9 50.00 4 | 0 0 0.00 | 0.000 80.475 80.475 | 3.3
10 55.00 4 | 0 1 0.00 | 10.000 78.614 88.614 | 4.3
11 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 5.5
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=40.00 dilate_px=3 total_error=79.232 (defect=0.000, quality=79.2323; conn=0, loop=0, empty=0.00)
ring_03: 7,186 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_03.html
===== ring_04 (4/10) — 325,160 pts, band z=[-3.6654, -1.8561] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.1
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.2
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.4
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.6
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 0.9
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.3
7 45.00 3 | 0 2 0.00 | 20.000 76.776 96.776 | 1.8
8 45.00 4 | 0 0 0.00 | 0.000 82.358 82.358 | 2.4
9 50.00 4 | 0 0 0.00 | 0.000 80.475 80.475 | 3.2
10 55.00 4 | 0 3 0.00 | 30.000 78.614 108.614 | 4.2
11 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 5.4
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=40.00 dilate_px=3 total_error=79.232 (defect=0.000, quality=79.2323; conn=0, loop=0, empty=0.00)
ring_04: 7,023 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_04.html
===== ring_05 (5/10) — 325,428 pts, band z=[-1.8561, -0.0467] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.1
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.2
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.4
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.7
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 1.0
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.3
7 45.00 3 | 0 2 0.00 | 20.000 76.776 96.776 | 1.8
8 45.00 4 | 0 0 0.00 | 0.000 82.358 82.358 | 2.5
9 50.00 4 | 0 0 0.00 | 0.000 80.475 80.475 | 3.2
10 55.00 4 | 0 5 0.00 | 50.000 78.614 128.614 | 4.2
11 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 5.4
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=40.00 dilate_px=3 total_error=79.232 (defect=0.000, quality=79.2323; conn=0, loop=0, empty=0.00)
ring_05: 7,019 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_05.html
===== ring_06 (6/10) — 341,357 pts, band z=[-0.0467, 1.8531] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.1
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.3
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.4
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.7
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 1.0
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.4
7 45.00 3 | 0 3 0.00 | 30.000 76.776 106.776 | 1.9
8 45.00 4 | 0 0 0.00 | 0.000 82.358 82.358 | 2.5
9 50.00 4 | 0 0 0.00 | 0.000 80.475 80.475 | 3.4
10 55.00 4 | 0 3 0.00 | 30.000 78.614 108.614 | 4.4
11 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 5.6
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=40.00 dilate_px=3 total_error=79.232 (defect=0.000, quality=79.2323; conn=0, loop=0, empty=0.00)
ring_06: 7,188 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_06.html
===== ring_07 (7/10) — 325,036 pts, band z=[1.8531, 3.6625] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.1
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.2
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.4
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.6
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 0.9
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.3
7 45.00 3 | 0 3 0.00 | 30.000 76.776 106.776 | 1.8
8 45.00 4 | 0 0 0.00 | 0.000 82.358 82.358 | 2.4
9 50.00 4 | 0 0 0.00 | 0.000 80.475 80.475 | 3.2
10 55.00 4 | 0 4 0.00 | 40.000 78.614 118.614 | 4.1
11 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 5.3
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=40.00 dilate_px=3 total_error=79.232 (defect=0.000, quality=79.2323; conn=0, loop=0, empty=0.00)
ring_07: 7,019 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_07.html
===== ring_08 (8/10) — 341,301 pts, band z=[3.6625, 5.5623] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.1
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.2
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.4
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.6
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 0.9
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.3
7 45.00 3 | 0 0 0.00 | 0.000 76.776 76.776 | 1.9
8 50.00 3 | 0 15 0.00 | 150.000 74.358 224.358 | 2.6
9 50.00 5 | 0 0 0.00 | 0.000 84.262 84.262 | 3.6
10 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 4.9
11 60.00 5 | 0 0 0.00 | 0.000 81.225 81.225 | 6.4
12 65.00 5 | 0 1 0.00 | 10.000 79.728 89.728 | 8.1
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=45.00 dilate_px=3 total_error=76.776 (defect=0.000, quality=76.7756; conn=0, loop=0, empty=0.00)
ring_08: 8,085 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_08.html
===== ring_09 (9/10) — 325,265 pts, band z=[5.5623, 7.3716] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.1
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.2
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.4
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.6
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 0.9
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.3
7 45.00 3 | 0 1 0.00 | 10.000 76.776 86.776 | 1.8
8 45.00 4 | 0 0 0.00 | 0.000 82.358 82.358 | 2.5
9 50.00 4 | 0 1 0.00 | 10.000 80.475 90.475 | 3.2
10 50.00 5 | 0 0 0.00 | 0.000 84.262 84.262 | 4.1
11 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 5.3
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=40.00 dilate_px=3 total_error=79.232 (defect=0.000, quality=79.2323; conn=0, loop=0, empty=0.00)
ring_09: 7,020 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_09.html
===== ring_10 (10/10) — 244,512 pts, band z=[7.3716, 9.0453] =====
step pps dil_px | conn loop empty | defect qual total | t(s)
----------------------------------------------------------------------------------
0 10.00 3 | 0 0 0.00 | 0.000 94.785 94.785 | 0.0
1 15.00 3 | 0 0 0.00 | 0.000 92.096 92.096 | 0.1
2 20.00 3 | 0 0 0.00 | 0.000 89.446 89.446 | 0.2
3 25.00 3 | 0 0 0.00 | 0.000 86.834 86.834 | 0.3
4 30.00 3 | 0 0 0.00 | 0.000 84.262 84.262 | 0.5
5 35.00 3 | 0 0 0.00 | 0.000 81.728 81.728 | 0.7
6 40.00 3 | 0 0 0.00 | 0.000 79.232 79.232 | 1.0
7 45.00 3 | 0 1 0.00 | 10.000 76.776 86.776 | 1.4
8 45.00 4 | 0 0 0.00 | 0.000 82.358 82.358 | 1.8
9 50.00 4 | 0 1 0.00 | 10.000 80.475 90.475 | 2.4
10 50.00 5 | 0 0 0.00 | 0.000 84.262 84.262 | 3.1
11 55.00 5 | 0 0 0.00 | 0.000 82.737 82.737 | 4.0
[tune] total_error not improved for 5 steps since reaching a clean skeleton - stopping (converged)
[tune] BEST pps=40.00 dilate_px=3 total_error=79.232 (defect=0.000, quality=79.2323; conn=0, loop=0, empty=0.00)
ring_10: 6,643 skeleton pts -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots/ring_10.html
Stored 10 rings (70,843 2D skeleton points) in RING_2D.
Per-ring plots (ring_XX.html + _convergence.html) + CSVs saved in /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_plots
Detected bad connections were auto-cleaned; review each ring_XX.html for any remaining errors and fix them by hand in the manual-edit step.
[checkpoint] saved 10 per-ring 2D skeletons -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/ring_2d.pkl
Assembled 2D skeleton: 70,843 points | pixel_size median = 0.00268
[collapse_junctions] collapsed 134 cluster(s); junction nodes 813 -> 90; total nodes 70843 -> 70165 (edge-connected contraction)
[prune_spurs] removed 0 nodes in 0 spur branch(es); remaining non-tip endpoints: 0
Skeleton finalised: 70,165 points (90 junctions, 0 endpoints)
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_points.csv
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_only.html (inspect the final 3D skeleton)
Grouped 135 curves; fitted 135 splines.
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/splines.html
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_splines.json (135 curves)
[saved] final outputs:
/Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_points.csv
/Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/splines.html
/Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_splines.json
/Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_with_cloud.html
/Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/stent_features.json
ring_boundaries: 11 values folded into stent_features.json
The results of the skeletonization and spline fitting have been saved in /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01. Please check the results. The stent 1D wireframe is now ready for the simulation.
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_splines_2d.png (135 curves, 11 ring boundaries, 10/10 ring tuning plots)
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_splines_2d.html
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_splines_trimesh.html
[saved] /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01/skeleton_splines.glb (135 spline curves, tube_radius=0.05544)
[pipeline] done -> /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01
'# Or: phase by phase\nstent = Stent(str(STL_FILE), STENT_NAME, str(OUTPUT_DIR))\nstent.skeletonize_2d() # sample -> rings -> per-ring 2D skeleton + checkpoint\nstent.edit_and_assemble() # manual 2D fixes -> one assembled flat skeleton\nstent.finalize() # wrap to 3D -> clean graph -> fit splines\n\n# after a kernel restart, pick straight back up from the checkpoint:\nstent = Stent.load(str(OUTPUT_DIR))\nstent.edit_and_assemble().finalize()'
print(f"Results for {stent.stent_name}:")
print(f"Points sampled : {len(stent.stent_df):,}")
print(f"skeleton nodes : {len(stent.skeleton_df):,}")
print(f"curves : {len(stent.skeleton_curves)}")
print(f"splines fitted : {sum(s is not None for s in stent.skeleton_splines)}")
print(f"outputs : {stent.output_dir}")
stent.skeleton_df.head()
Results for stent01:
Points sampled : 1,824,400
skeleton nodes : 70,165
curves : 135
splines fitted : 135
outputs : /Users/vural/Desktop/RWTH - SiSc/Projects/Github/stentFIT/examples/data/output/stent_skeleton_oop/stent01
| skeleton_point_id | x | y | z | r | theta | node_type | degree | neighbor_ids | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | -1.447733 | -0.455055 | -8.985223 | 1.517566 | -2.837048 | line | 2 | [1, 116] |
| 1 | 1 | -1.447165 | -0.457685 | -8.985223 | 1.517815 | -2.835283 | line | 2 | [0, 2] |
| 2 | 2 | -1.446329 | -0.460231 | -8.985223 | 1.517788 | -2.833518 | line | 2 | [1, 3] |
| 3 | 3 | -1.445612 | -0.462815 | -8.985223 | 1.517890 | -2.831752 | line | 2 | [2, 4] |
| 4 | 4 | -1.444679 | -0.465330 | -8.985223 | 1.517771 | -2.829987 | line | 2 | [3, 5] |