Skip to content

converter script from .vtp to .mdl#10

Open
chlookaburra wants to merge 3 commits into
SimVascular:masterfrom
chlookaburra:convert-vtp-to-mdl
Open

converter script from .vtp to .mdl#10
chlookaburra wants to merge 3 commits into
SimVascular:masterfrom
chlookaburra:convert-vtp-to-mdl

Conversation

@chlookaburra
Copy link
Copy Markdown

This script converts a .vtp file to an .mdl file with the guidance of the mesh-surfaces folder. Joint work with @jeffbli , Claude, and ChatGPT.

--out mesh_name.mdl --out-vtp mesh_name.vtp

Authors: Jeff B. Li, Chloe Choi, Claude, ChatGPT
"""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chlookaburra We don't put author names in files anymore.

@ktbolt
Copy link
Copy Markdown
Contributor

ktbolt commented May 21, 2026

@chlookaburra The vtp_to_capped_mdl_README.md should be renamed README.md so it will be displayed by GitHUb.

@ktbolt
Copy link
Copy Markdown
Contributor

ktbolt commented May 21, 2026

@chlookaburra I think the script argument names are confusiing

    vtp_to_capped_mdl.py \
    --vtp      mesh_name.vtp \
    --surfaces mesh_name-mesh-surfaces \
    --out      mesh_name.mdl \
    --out-vtp  mesh_name.vtp

I suggest

rename --vtp to --mesh-exterior

rename --surfaces to --mesh-surface-files

--out-vtp mesh_name.vtp seems to imply that you are writing over the mesh exterior file.

combine --out and --out-vtp to --model-name since both the model VTP and MDL files should have the same prefix.

@ktbolt
Copy link
Copy Markdown
Contributor

ktbolt commented May 21, 2026

@chlookaburra The script does not need to be run in the SimVascular Python environment since it does not import sv.

But it may be convenient to use the Python vtk package from the SimVascular Python environment.

Fixed all relevant changes! Thank you for the suggestions.
Made a small edit regarding import sv in README.md that was not included in the previous commit
@chlookaburra
Copy link
Copy Markdown
Author

chlookaburra commented May 22, 2026

@ktbolt Addressed your suggestions!

@ktbolt
Copy link
Copy Markdown
Contributor

ktbolt commented May 22, 2026

@chlookaburra Looks good !

You do need to remove the vtp_to_capped_mdl_README.md file.

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.

2 participants