Insert Kink

Is there a way to insert a kink into an existing polyine in grasshopper much the same way the “Insert Kink” does in Rhino.

polylines are mainly a list of points.
_insertKink - for a polyline is the same as inserting an additional point.

does this somehow help ?
if not - please give an example (3dm file) of what you re trying to do.
the curve before and after you inserted a knot.

kind regards - tom

Thanks that is close. I guess that I am struggling with is I know the points, but not sure how to insert them into the existing list of points since the “control points” component does give the parameter in curves domain like the closest point component does.

Insert Kink.3dm (110.2 KB)

The parametrization of normal Polylines are quite handy:
the parameter IS the length-factor from the start of the curve.
Usually grasshopper parametrization for polylines is an integer going up for each point.
For example, in a polyline of 3 points, ABC, two segments:
- the parameter 1.5 is in the middle of the second segment, BC
- 0.6666 is at 2/3 of the first segment, AB
- 1 is exactly the second point, B
… and so on.
For Rhino polylines the parametrization is the actual length, but should work the same…

For polylines, even knots are handy too in a similar way:

1 Like

Cool. Thanks that is what I needed.