pyvista.Disc#
- Disc(
- center: VectorLike[float] = (0.0, 0.0, 0.0),
- inner: float = 0.25,
- outer: float = 0.5,
- normal: VectorLike[float] = (0.0, 0.0, 1.0),
- r_res: int = 1,
- c_res: int = 6,
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.- inner
float
, default: 0.25 The inner radius.
- outer
float
, 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_res
int
, default: 1 Number of points in radial direction.
- c_res
int
, default: 6 Number of points in circumferential direction.
- centersequence[
- 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)