pyvista_js.Cylinder

目次

pyvista_js.Cylinder#

pyvista_js.Cylinder(center: tuple[float, float, float] = (0.0, 0.0, 0.0), direction: tuple[float, float, float] = (1.0, 0.0, 0.0), radius: float = 0.5, height: float = 1.0, resolution: int = 100) PolyData#

Create a cylinder mesh.

パラメータ:
  • center (tuple, optional) -- Center of the cylinder (x, y, z). Default is (0, 0, 0).

  • direction (tuple, optional) -- Direction vector of the cylinder axis. Default is (1, 0, 0).

  • radius (float, optional) -- Radius of the cylinder. Default is 0.5.

  • height (float, optional) -- Height of the cylinder. Default is 1.0.

  • resolution (int, optional) -- Number of points around the cylinder. Default is 100.

戻り値:

A cylinder mesh.

戻り値の型:

PolyData

サンプル

>>> import pyvista_js as pv
>>> cylinder = pv.Cylinder(radius=1.0, height=2.0)