Module pavpen.geometry_calculator.rounded_corner_calculator

class pavpen.geometry_calculator.rounded_corner_calculator.RoundedCornerCalculator[Vector](vector_field_operations: FloatVectorFieldOperations, previous_vertex: Vector, corner_vertex: Vector, next_vertex: Vector, radius: float, x_hat: Vector | None = None, y_hat: Vector | None = None, float_tolerance: float = 1e-09)[source]

Bases: Generic

Calculates the parameters of a rounded corner’s circular arc

The non-rounded corner, for which a rounded corner arc is to be calculated is determined by previous_vertex, corner_vertex, and next_vertex.

If x_hat, and y_hat are specified, they define the coordinate system basis for outputs, such as the center of the rouded corner circle, and the start and end point of the rounded corner arc.

Parameters:
  • vector_field_operations – defines how to calculate vector operations for vectors, such as previous_vertex, corner_vertex, and next_vertex

  • radius – the radius of the rounded corner’s circle

calculate() Self[source]

Calculates, and sets the folowing output parameters of the rounded corner arc as attributes of self:

  • center

  • radius

  • arc_start

  • arc_midpoint

  • arc_end

class pavpen.geometry_calculator.rounded_corner_calculator.RoundedCornerCalculatorComputedValueNames(*values)[source]

Bases: Enum

ARC_END = 'arc_end'[source]
ARC_MIDPOINT = 'arc_midpoint'[source]
ARC_START = 'arc_start'[source]
CENTER = 'center'[source]
RADIUS = 'radius'[source]