pyvista_js.Cone

目次

pyvista_js.Cone#

pyvista_js.Cone(center: tuple[float, float, float] = (0.0, 0.0, 0.0), direction: tuple[float, float, float] = (1.0, 0.0, 0.0), height: float = 1.0, radius: float = 0.5, resolution: int = 6, capping: bool = True) PolyData#

Create a cone mesh.

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

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

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

  • radius (float, optional) -- Base radius of the cone. Default is 0.5.

  • resolution (int, optional) -- Number of facets around the cone. Default is 6.

  • capping (bool, optional) -- Whether to cap the base of the cone. Default is True.

戻り値:

A cone mesh.

戻り値の型:

PolyData

サンプル

>>> import pyvista_js as pv
>>> cone = pv.Cone(center=(0, 0, 0), direction=(1, 0, 0), height=1.0, radius=0.5, resolution=6)
>>> cone.plot()