Skip to content

export_vtk

export_vtk

Attributes

SCHEMA_VERSION module-attribute

SCHEMA_VERSION = 1

Functions:

build_vtk_info_snapshot

build_vtk_info_snapshot(model, vtk_filename: str)

_used_femora_part_tags

_used_femora_part_tags(mesh)

_attach_femora_part_field_data

_attach_femora_part_field_data(model, mesh) -> None

_info_json_filename

_info_json_filename(vtk_filename: str) -> str

export_to_vtk

export_to_vtk(model, filename=None, write_info_json=False, indent=2)

Export the model to a vtk file

Parameters:

Name Type Description Default
model

Femora Model instance with an assembled mesh.

required
filename str

The filename to export to. If None, uses model_name in model_path

None
write_info_json bool

When True, also write a lightweight sidecar JSON file with region and meshpart info.

False
indent int

JSON indentation level for sidecar info.

2

Returns:

Name Type Description
bool

True if export was successful, False otherwise