ParaView And Others External Tools¶
Muscat offers some capabilities to communicate with external mesh dedicated tools.
Vtk [1]¶
If you have a working VTK installation, you can set the module Muscat.Bridges.vtkBridge
to convert meshes back and forth to Muscat meshes.
from Muscat.Bridges.vtkBridge import MeshToVtk, VtkToMesh
BTMesh = #<-- this is my Muscat Mesh
vtkMesh = MeshToVtk(BTMesh,TagsAsFields=True)
# do some work with VTK
vtk MeshII = #<- create a new vtk mesh from the output of a filter
BTMeshII = VtkToMesh(vtkMeshII,FieldsAsTags=True)
ParaView [2]¶
Conda/Mamba Users Installation¶
For the moment this functionality is not available on conda environment installation even if the plugin is installed in the path /conda_env_path/ParaViewPlugins/MuscatParaViewBridge.py
The reason is the incompatibility of the ParaView python with the conda python.
We are working on a solution for this problem
Developer Installation¶
Some functionalities (like readers, writers) can be added to ParaView as a plugin.
The configuration consists in setting the PYTHONPATH
environment variable to your Muscat installation
PYTHONPATH=/path/to/Muscat/src
Then you can load the plugin /path/to/Muscat/extras/MuscatParaViewBridge.py
using the Tools->Manage Plugins… menu.
Also, you can set the PV_PLUGIN_PATH
environment variable to indicate to ParaView to load automatically the plugin when starting.
PV_PLUGIN_PATH=/path/to/Muscat/extras
Three types of object are added to ParaView by the plugin:
Readers: The Muscat capabilities to read data from different file formats.
Writers: The Muscat capabilities to export data to different file formats.
Filters: Some of the mesh treatment functionalities of Muscat are exposed as vtk filters.
Be aware that the use of this functionalities involves a format conversion between the vtk and the Muscat internal format. Be aware that your Python installation version may not be compatible with Python version of ParaView.
MeshIO [3]¶
MeshIO is a library capable of reading and writing to various mesh file formats.
If you have a working MeshIO installation, you can set the module Muscat.Bridges.MeshIOBridge
to convert meshes back and forth to Muscat meshes.
MeshIO offers some reading and writing capabilities.
More informations in Muscat.Bridges.MeshIOBridge
.
PyVista [4]¶
If you have a working PyVista installation, you can set the module Muscat.Bridges.PyVistaBridge
to convert meshes back and forth to Muscat meshes.
PyVista offers a very simple interface for the visualisation of 3D meshes. More informations in Muscat.Bridges.PyVistaBridge
Footnotes