aerocaps.geom.curves.CircularArc2D#

class CircularArc2D(center: Point2D, radius: Length, start_point: Point2D = None, end_point: Point2D = None, start_angle: Angle = None, end_angle: Angle = None, complement: bool = False, name: str = 'CircularArc2D', construction: bool = False)[source]#

Bases: PCurve2D

Two-dimensional circular arc class

__init__(center: Point2D, radius: Length, start_point: Point2D = None, end_point: Point2D = None, start_angle: Angle = None, end_angle: Angle = None, complement: bool = False, name: str = 'CircularArc2D', construction: bool = False)[source]#

Creates a circular arc object.

Note

The center and radius must be specified, along with a combination of either start_point or start_angle and end_point or end_angle. The starting and ending points are only used to determine the angle based on relationship to the center. These points do not override the value specified by radius

Parameters:
  • center (Point2D) – Center of the arc

  • radius (Length) – Arc radius

  • start_point (Point2D) – Optional starting point for the arc. Default: None

  • end_point (Point2D) – Optional ending point for the arc. Default: None

  • start_angle (Angle) – Optional starting angle for the arc. Default: None

  • end_angle (Angle) – Optional ending angle for the arc. Default: None

  • complement (bool) – Whether to output the complement arc. Default: False

  • name (str) – Name of the geometric object. May be re-assigned a unique name when added to a GeometryContainer. Default: ‘CircularArc2D’

  • construction (bool) – Whether this is a geometry used only for construction of other geometries. If True, this geometry will not be exported or plotted. Default: False

Methods

d2cdt2(t)

Evaluates the second derivative of the curve with respect to \(t\)

dcdt(t)

Evaluates the first derivative of the curve with respect to \(t\)

evaluate(t)

Evaluates the line at one or more \(t\)-values

evaluate_pcurvedata(t)

Evaluates a verbose set of parametric curve data as a class based on an input parameter value or vector

evaluate_point2d(t)

Evaluates the line at one or more \(t\)-values and returns a single point object or list of point objects

plot(ax[, nt])

Plots the line on a matplotlib.pyplot.Axes

Attributes

d2cdt2(t: float) ndarray[source]#

Evaluates the second derivative of the curve with respect to \(t\)

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

If \(t\) is a float, the output is a 1-D array containing two elements: the \(x\)- and \(y\)-components of the second derivative. Otherwise, the output is a 2-D array of size \(\text{len}(t) \times 2\)

Return type:

numpy.ndarray

dcdt(t: float) ndarray[source]#

Evaluates the first derivative of the curve with respect to \(t\)

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

If \(t\) is a float, the output is a 1-D array containing two elements: the \(x\)- and \(y\)-components of the first derivative. Otherwise, the output is a 2-D array of size \(\text{len}(t) \times 2\)

Return type:

numpy.ndarray

evaluate(t: float) ndarray[source]#

Evaluates the line at one or more \(t\)-values

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

If t is a float, the output is a 1-D array with two elements: the values of \(x\) and \(y\). Otherwise, the output is an array of size \(\text{len}(t) \times 2\)

Return type:

numpy.ndarray

evaluate_pcurvedata(t: float) PCurveData2D[source]#

Evaluates a verbose set of parametric curve data as a class based on an input parameter value or vector

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

Parametric curve information, including derivative and curvature data

Return type:

PCurveData2D

evaluate_point2d(t: float) Point2D[source]#

Evaluates the line at one or more \(t\)-values and returns a single point object or list of point objects

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

If t is a float, the output is a single point object. Otherwise, the output is a list of point objects

Return type:

Point2D or List[Point2D]

plot(ax: Axes, nt: int = 100, **kwargs)[source]#

Plots the line on a matplotlib.pyplot.Axes

Parameters:
  • ax (plt.Axes) – Axis on which to plot the arc

  • nt (int) – Number of points along the arc to output to the plot. Default: 100

  • kwargs – Additional keyword arguments to pass to matplotlib.pyplot.Axes.plot