pyvista_wasm.Cone#
- pyvista_wasm.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.
- Parameters:
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.
- Returns:
A cone mesh.
- Return type:
Examples
>>> import pyvista_wasm as pv >>> cone = pv.Cone(center=(0, 0, 0), direction=(1, 0, 0), height=1.0, radius=0.5, resolution=6) >>> cone.plot()