QRouteLead¶
- class QRouteLead(*args, **kwargs)[source]¶
A simple class to define a an array of points with some properties, defines 2D positions and some of the 2D directions (XY plane).
All values stored as np.ndarray of parsed floats.
QRouteLead is a simple sequence of points.
Used to accurately control one of the QRoute termination points Before that, it adds the variables that are needed to support routing.
- pts¶
Sequence of points. Defaults to None.
- Type:
numpy Nx2
- direction¶
Normal from the last point of the array. Defaults to None.
- Type:
numpy 2x1
Attributes
Sum of all segments length, including the head.
Methods
Access the last element in the QRouteLead.
QRouteLead.go_angle
(length, angle)Straight line at any angle w.r.t lead tip direction.
QRouteLead.go_left
(length)Straight line 90deg counter-clock-wise direction w.r.t.
QRouteLead.go_left45
(length)Straight line at 45 angle counter-clockwise w.r.t lead tip direction.
QRouteLead.go_right
(length)Straight line 90deg clock-wise direction w.r.t.
QRouteLead.go_right45
(length)Straight line at 45 angle clockwise w.r.t lead tip direction.
QRouteLead.go_straight
(length)Add a point ot 'length' distance in the same direction.
Initialize the QRouteLead by giving it a starting point and a direction.