pyvista.CircularArc#

CircularArc(pointa, pointb, center, resolution=100, negative=False)[source]#

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.

resolutionint, 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 pointa and pointb.

By setting this to True, the longest angular sector is used instead (i.e. the negative coterminal angle to the shortest one).

Returns:
pyvista.PolyData

Circular arc mesh.

Examples

Create a quarter arc centered at the origin in the xy plane.

>>> import pyvista as pv
>>> arc = pv.CircularArc([-1, 0, 0], [0, 1, 0], [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()
https://d33wubrfki0l68.cloudfront.net/fd8d98201d8338c2510defcdaf25d073fba0b899/30ef7/_images/pyvista-circulararc-1_00_00.png