pyvista.DataSet.arrows

pyvista.DataSet.arrows#

property DataSet.arrows: pyvista.PolyData | None[ソース]#

アクティブなベクトルデータのグリフ表現を矢印で返します.

Arrows will be located at the points or cells of the mesh and their size will be dependent on the norm of the vector. Their direction will be the "direction" of the vector.

If there are both active point and cell vectors, preference is given to the point vectors.

戻り値:
pyvista.PolyData

アクティブベクトルを矢印で表しています.

Create a mesh, compute the normals and set them active.

>>> import pyvista as pv
>>> mesh = pv.Cube()
>>> mesh_w_normals = mesh.compute_normals()
>>> mesh_w_normals.active_vectors_name = 'Normals'

Plot the active vectors as arrows. Show the original mesh as wireframe for context.

>>> arrows = mesh_w_normals.arrows
>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(mesh, style='wireframe')
>>> _ = pl.add_mesh(arrows, color='red')
>>> pl.show()
../../../_images/pyvista-DataSet-arrows-1_00_00.png