pyvista.CircularArc#
- CircularArc(
 - pointa: VectorLike[float],
 - pointb: VectorLike[float],
 - center: VectorLike[float],
 - resolution: int = 100,
 - negative: bool = False,
 Create a circular arc defined by two endpoints and a center.
The number of segments composing the polyline is controlled by setting the object resolution.
- Parameters:
 - pointasequence[
float] Position of the first end point.
- pointbsequence[
float] Position of the other end point.
- centersequence[
float] Center of the circle that defines the arc.
- resolution
int, default: 100 The number of segments of the polyline that draws the arc. Resolution of 1 will just create a line.
- negativebool, default: 
False By default the arc spans the shortest angular sector between
pointaandpointb.By setting this to
True, the longest angular sector is used instead (i.e. the negative coterminal angle to the shortest one).
- pointasequence[
 - Returns:
 pyvista.PolyDataCircular arc mesh.
Examples
Create a quarter arc centered at the origin in the xy plane.
>>> import pyvista as pv >>> arc = pv.CircularArc(pointa=[-1, 0, 0], pointb=[0, 1, 0], center=[0, 0, 0]) >>> pl = pv.Plotter() >>> _ = pl.add_mesh(arc, color='k', line_width=10) >>> _ = pl.show_bounds(location='all', font_size=30, use_2d=True) >>> _ = pl.view_xy() >>> pl.show()