knots.path.path_from_pts#
- knots.path.path_from_pts(points: Sequence[tuple[Pt, float]], scale: float = 0.3, closed: bool = False) Path[source]#
Convert a sequence of points and entrance angles to a
PathThis will generate a compound cubic Bezier curve to represent the path via
gen_curve4.- Parameters:
- pointssequence of (Pt, float)
The location and entrance angle of the point
- scalefloat, default: 0.3
This controls how “loopy” the path is. Smaller numbers stay closer to the direct line between the points and have sharper turns. Bigger numbers have gentler curves, but get farther from the direct line in the transverse direction.
Is used to scale how far the control points are away from direct line between the end points as in
gen_curve4.- closedbool, default: False
If the path should be closed or not.
If closed, the first point will be repeated at the and the
Pathwill include theCLOSEPOLYcode.