DataSet.active_vectors_info

DataSet.active_vectors_info#

property DataSet.active_vectors_info: ActiveArrayInfoTuple[source]#

Return the active vector’s association and name.

Association refers to the data association (for example, point, cell, or field) of the active vectors.

Returns:
ActiveArrayInfo

The vectors info in an object with namedtuple semantics, with attributes association and name.

Notes#

If the point and cell attributes both have active vectors and neither has been chosen at the dataset level, the point vectors are reported.

Examples#

Download Python source code | Download Jupyter notebook

Create a mesh, compute the normals inplace, set the active vectors to the normals, and show that the active vectors are the 'Normals' array associated with points.

>>> import pyvista as pv
>>> mesh = pv.Sphere()
>>> _ = mesh.compute_normals(inplace=True)
>>> mesh.active_vectors_name = 'Normals'
>>> mesh.active_vectors_info
ActiveArrayInfoTuple(association=<FieldAssociation.POINT: 0>, name='Normals')