pyvista_wasm.Cylinder#
- pyvista_wasm.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.
- Parameters:
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.
- Returns:
A cylinder mesh.
- Return type:
Examples
>>> import pyvista_wasm as pv >>> cylinder = pv.Cylinder(radius=1.0, height=2.0)