route_to_parallel_line

ipkiss3.all.route_to_parallel_line(start_pos, angle_in, line_point, angle_out, bend_size_fn, bend90_size_fn=None, max_s_bend_angle=90.0, s_bend_angle_resolution=-0.1, start_straight=0.0, end_straight=0.0, min_straight=0.0)

Calculate a route to a line that is parallel with input angle.

In the case of parallel lines (not coincident lines): if the absolute difference between angle_in and angle_out is smaller than 0.1, then that difference will be ignored and the output angle will be the same as the input angle.

Parameters:
start_pospoint

2-dimensional point from where the route should start.

angle_infloat

The angle the route needs to start with.

line_pointpoint

A point on the line you want to route to.

angle_outfloat

Angle of the line you want to route to

bend_size_fncallable

Calculates the sizes of the bends

bend90_size_fncallable

Calculates the size of a 90 deg bend, uses bend_size_fn when None.

max_s_bend_anglefloat

The maximum angle of the bends along the route

start_straightfloat

The length of the start straight section

end_straightfloat

The length of the end straight section

min_straightfloat

The minimum length of any intermediary straight sections. ( like in U-turns )

Returns:
numpy array

An array of points that represents the path of the route.