pyvista.CircularArcFromNormal#

CircularArcFromNormal(center, resolution=100, normal=None, polar=None, angle=None)[source]#

Create a circular arc defined by normal to the plane of the arc, and an angle.

The number of segments composing the polyline is controlled by setting the object resolution.

Parameters:
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.

normalsequence[float], optional

The normal vector to the plane of the arc. By default it points in the positive Z direction.

polarsequence[float], optional

Starting point of the arc in polar coordinates. By default it is the unit vector in the positive x direction.

anglefloat, optional

Arc length (in degrees) beginning at the polar vector. The direction is counterclockwise. By default it is 90.

Returns:
pyvista.PolyData

Circular arc mesh.

Examples

Quarter arc centered at the origin in the xy plane.

>>> import pyvista as pv
>>> normal = [0, 0, 1]
>>> polar = [-1, 0, 0]
>>> arc = pv.CircularArcFromNormal(
...     [0, 0, 0], normal=normal, polar=polar
... )
>>> 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()
../../../_images/pyvista-CircularArcFromNormal-1_00_00.png