Middle node in curves

Is there a scripted way to place new nodes along a curve in the exact middle of it? I can’t find a way to do it without breaking the whole shape.
If you know of a script that approximates curves to straight segments, while keeping the extremes, that could also work!

I would recommend using:

GSPath.pointAtPathTime_()

and

GSPath.insertNodeWithPathTime_()

The path time you are looking for is the index of the path’s first oncurve node (ignoring offcurve nodes), plus 0.5 (for the middle of the segment).

1 Like

Hi,
You can use too… Harbor Type script.

1 Like