RouteMixed.adjust_length#

RouteMixed.adjust_length(delta_length, pts, start_pt: QRoutePoint, end_pt: QRoutePoint) ndarray#

Edits meander points to redistribute the length slacks accrued with the various local adjustments It should be run after self.pts_intermediate is completely defined Inputs are however specific to the one meander segment Assumption is that pts is always a sequence of paired points, each corresponds to one meander 180deg curve The pts is typically an odd count since the last point is typically used to anchor the left-over length, therefore this code supports both odd and even cases, separately. For even it assumes all points are in paired.

Parameters:
  • delta_length (delta_length) – slack/excess length to distribute on the pts

  • pts (np.array) – intermediate points of meander. pairs, except last point (2,2,…,2,1)

  • start_pt (QRoutePoint) – QRoutePoint of the start

  • end_pt (QRoutePoint) – QRoutePoint of the end

Returns:

Array of points

Return type:

np.ndarray