Getting started#
This section describes how to install the Visualization Interface Tool in user mode and quickly begin using it. If you are interested in contributing to the Visualization Interface Tool, see Contribute for information on installing in developer mode.
Installation#
To use pip to install the Visualization Interface Tool, run this command:
pip install ansys-tools-visualization-interface
Alternatively, to install the latest version from this library’s GitHub repository, run these commands:
git clone https://github.com/ansys/ansys-tools-visualization-interface
cd ansys-tools-visualization-interface
pip install .
Quick start#
The following examples show how to use the Visualization Interface Tool to visualize a mesh file.
This code uses only a PyVista mesh:
from ansys.tools.visualization_interface import Plotter
my_mesh = my_custom_object.get_mesh()
# Create a Visualization Interface Tool object
pl = Plotter()
pl.plot(my_mesh)
# Plot the result
pl.show()
This code uses objects from a PyAnsys library:
from ansys.tools.visualization_interface import Plotter, MeshObjectPlot
my_custom_object = MyObject()
my_mesh = my_custom_object.get_mesh()
mesh_object = MeshObjectPlot(my_custom_object, my_mesh)
# Create a Visualization Interface Tool object
pl = Plotter()
pl.plot(mesh_object)
# Plot the result
pl.show()