translate

Contents

translate#

translate(
surf: DataSet,
center: VectorLike[float] = (0.0, 0.0, 0.0),
direction: VectorLike[float] = (1.0, 0.0, 0.0),
) None[source]#

Translate and orient a mesh to a new center and direction.

By default, the input mesh is considered centered at the origin and facing in the x direction.

Parameters:
surfpyvista.core.pointset.PolyData

Mesh to be translated and oriented.

centertuple, optional, default: (0.0, 0.0, 0.0)

Center point to which the mesh should be translated.

directiontuple, optional, default: (1.0, 0.0, 0.0)

Direction vector along which the mesh should be oriented.