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
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.
- normalsequence,
optional
The normal vector to the plane of the arc. By default it points in the positive Z direction.
- polarsequence,
optional
Starting point of the arc in polar coordinates. By default it is the unit vector in the positive x direction.
- angle
float
,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 >>> normal = [0, 0, 1] >>> polar = [-1, 0, 0] >>> arc = pyvista.CircularArcFromNormal([0, 0, 0], normal=normal, polar=polar) >>> pl = pyvista.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()