pyvista.DataObjectFilters.translate#
- DataObjectFilters.translate( ) DataSet | MultiBlock[ソース]#
メッシュを移動します.
注釈
See also the notes at
transform()which is used by this filter under the hood.- パラメータ:
- 戻り値:
DataSet|MultiBlockTranslated dataset. Return type matches input unless input dataset is a
RectilinearGrid, in which case the output datatype is aStructuredGrid.
参考
pyvista.Transform.translate変換行列と変換を連結します。
例
球体を作成し,それを
(2, 1, 2)で平行移動させます.>>> import pyvista as pv >>> mesh = pv.Sphere() >>> mesh.center (0.0, 0.0, 0.0) >>> trans = mesh.translate((2, 1, 2), inplace=False) >>> trans.center (2.0, 1.0, 2.0)