Script to attach polyline/curve to a single Point3d handle

With a mixture of this code and the previous one I think I found what I want. This way of filtering the geometry and extracting the polyline and its components is very interesting.
I’ll come back to you if I need further help, thanks for your help!