pyvista.Disc#

Disc(
center=(0.0, 0.0, 0.0),
inner=0.25,
outer=0.5,
normal=(0.0, 0.0, 1.0),
r_res=1,
c_res=6,
)[source]#

Create a polygonal disk with a hole in the center.

The disk has zero height. The user can specify the inner and outer radius of the disk, and the radial and circumferential resolution of the polygonal representation.

Parameters:
centersequence[float], default: (0.0, 0.0, 0.0)

Center in [x, y, z]. Middle of the axis of the disc.

innerfloat, default: 0.25

The inner radius.

outerfloat, default: 0.5

The outer radius.

normalsequence[float], default: (0.0, 0.0, 1.0)

Direction vector in [x, y, z]. Orientation vector of the disc.

r_resint, default: 1

Number of points in radial direction.

c_resint, default: 6

Number of points in circumferential direction.

Returns:
pyvista.PolyData

Disk mesh.

Examples

Create a disc with 50 points in the circumferential direction.

>>> import pyvista as pv
>>> mesh = pv.Disc(c_res=50)
>>> mesh.plot(show_edges=True, line_width=5)
../../../_images/pyvista-Disc-1_00_00.png