Calculate the maximum bend radius for each turn to be made along a control shape

An open shape with N points has N-2 turns (the first turn is in the 2nd point and so forth), and thus returns N-2 radii.

For a closed shape, the first turn is in the 1st point (from the last to the 2nd) and so forth. A shape with N points has N turns and returns N radii

The return value can be passed directly to the bend_radii parameter of i3.RoundedTrace.Layout or i3.RoundedWaveguide.Layout

Parameters
control_shape: Shape or np.ndarray

The control shape which will be rounded

rounding_algorithms: List[ShapeRound, SplineRoundingAlgorithm()] or single value

The rounding algorithms to apply in each turn in the shape. When a single rounding algorithm is given it will be used for the whole shape

reverse_individual_bends: List[bool] or None

For each turn, whether to reverse the bend (applicable for asymmetric bends)

Returns

Returns the maximum bend radius in each turn.

Raises
Raises a ValueError if the shape contains an angle for which the required radius cannot be calculated.

Examples

```import ipkiss3.all as i3
control_shape = i3.Shape([(0.0, 0.0), (20.0, 0.0), (30.0, 10.0), (-10.0, 10.0), (-10.0, 40.0)])
rmax = i3.maximum_bend_radii(control_shape)  #  use the default circular rounding
waveguide =  i3.RoundedWaveguide()
waveguide_layout.visualize()
``` ```import ipkiss3.all as i3 