How to transform object along line with flow component in Grasshopper


I want to deform a closed shape object along the lines of a contour, as shown below, but it doesn’t work.

I used Flow component to deform the object along the border, but it does not give an ideal shape.

Can you tell me how to do this?
deform along (80.1 KB)