Polyline Replacement with Spatial Deform

I have a “main polyline”, and I wish to substitute certain segments of it(“old polylines”) with "new polylines."while maintaining a shape similar to that of the “main polylines.” I intend to employ spatial deform, but I encounter an unusual shape distortion. All curves are internalized, and no plugins are required to view the file. Thanks for all your assistance. I will include the .gh file.
help.gh (13.1 KB)

Nobody?

help v0 short segments.gh (18.8 KB)
you have short segments.

thank you for your response. However, the file you sent me does not contain the information I need. I have sent you a picture of the problem I am trying to fix (picture 2). I would like to adjust the curves in this picture.”


the output of your method:

help v1 Network Optimization.gh (109.0 KB)
That is why I told you there are short segments.
How to optimize the network, how to move the parts depends on your will.
Network topology is changed, “old” and “new” will not apply.

thank you for your response.I just solved the problem. :slightly_smiling_face:
the output :