pyvista.CylinderSource#
- class CylinderSource(
- center: VectorLike[float] = (0.0, 0.0, 0.0),
- direction: VectorLike[float] = (1.0, 0.0, 0.0),
- radius: float = 0.5,
- height: float = 1.0,
- capping: bool = True,
- resolution: int = 100,
円柱ソースアルゴリズムクラス
警告
pyvista.Cylinder()
関数はpyvista.CylinderSource
のpyvista.PolyData
を独自の方法で回転させます.pyvista.CylinderSource.output
をz軸方向に90度回転させ,メッシュを新しいcenter
とdirection
に平行移動させ,向きを調整します.- パラメータ:
例
デフォルトの円柱ソースを作成します.
>>> import pyvista as pv >>> source = pv.CylinderSource() >>> source.output.plot(show_edges=True, line_width=5)
デフォルトの
CylinderSource
の3Dプロットを表示します.>>> import pyvista as pv >>> pl = pv.Plotter() >>> _ = pl.add_mesh(pv.CylinderSource(), show_edges=True, line_width=5) >>> pl.show()
CylinderSource
の出力を3Dプロットで視覚化します.>>> pl = pv.Plotter() >>> _ = pl.add_mesh(pv.CylinderSource().output, show_edges=True, line_width=5) >>> pl.show()
上記の例は動作が似ています.
メソッド
アトリビュート
キャップ円柱の終点をポリゴンで取得します.
キャッピングがシリンダーをカプセルにするかどうかを取得します。
[x, y, z]
中のセントロイドの位置を取得します.[x, y, z]
の方向ベクトルを取得します.円柱の高さを取得します.
このアルゴリズムのポートの出力データオブジェクトを取得します.
円柱の半径を取得します.
円柱の円形面上の点の数を取得します.