Graphics#

class ansys.fluent.visualization.pyvista.pyvista_objects.Graphics(session, local_surfaces_provider=None)#

Provides the PyVista Graphics objects manager.

This class provides access to Graphics object containers for a given session so that graphics objects can be created.

Parameters
sessionobj

Session object.

local_surfaces_providerobject, optional

Object providing local surfaces so that you can access surfaces created in other modules, such as PyVista. The default is None.

Attributes
Meshesdict

Container for mesh objects.

Surfacesdict

Container for surface objects.

Contoursdict

Container for contour objects.

Vectorsdict

Container for vector objects.

Commands

Command

Summary

add_outline_mesh

Add a mesh outline.

In the following example, a Graphics object is instantiated with a Fluent session as its context. The Graphics object is used to create a mesh, contour, vector, and surface. The contour is then deleted.

from ansys.fluent.visualization.pyvista import  Graphics
graphics_session = Graphics(session)

#Create object
mesh1 = graphics_session.Meshes["mesh-1"]
contour1 = graphics_session.Contours["contour-1"]
vector1 = graphics_session.Vectors["vector-1"]
surface1 = graphics_session.Surfaces["surface-1"]

#Delete object
del graphics_session.Contours["contour-1"]