# CylinderStructured#

CylinderStructured(radius=0.5, height=1.0, center=(0.0, 0.0, 0.0), direction=(1.0, 0.0, 0.0), theta_resolution=32, z_resolution=10)[source]#

Create a cylinder mesh as a `pyvista.StructuredGrid`.

The end caps are left open. This can create a surface mesh if a single value for the `radius` is given or a 3D mesh if multiple radii are given as a list/array in the `radius` argument.

Parameters:
radius`float`, sequence, default: 0.5

Radius of the cylinder. If a sequence, then describes the radial coordinates of the cells as a range of values as specified by the `radius`.

height`float`, default: 1.0

Height of the cylinder along its Z-axis.

centersequence, default: (0.0, 0.0, 0.0)

Location of the centroid in `[x, y, z]`.

directionsequence, default: (1.0, 0.0, 0.0)

Direction cylinder Z-axis in `[x, y, z]`.

theta_resolution`int`, default: 32

Number of points on the circular face of the cylinder. Ignored if `radius` is an iterable.

z_resolution`int`, default: 10

Number of points along the height (Z-axis) of the cylinder.

Returns:
`pyvista.StructuredGrid`

Structured cylinder.

Notes

Changed in version 0.38.0: Prior to version 0.38, this method had incorrect results, producing inconsistent number of points on the circular face of the cylinder.

Examples

Default structured cylinder

```>>> import pyvista
>>> mesh = pyvista.CylinderStructured()
>>> mesh.plot(show_edges=True)
```

Structured cylinder with an inner radius of 1, outer of 2, with 5 segments.

```>>> import numpy as np
>>> mesh = pyvista.CylinderStructured(radius=np.linspace(1, 2, 5))
>>> mesh.plot(show_edges=True)
```