Subcurve problem

I have to curves inside one in other. I would like to make one curve out of the two.(green curve). I made two section lines to cut out a little piece to create subcurve of each other. But it does not seem to work. Why?
subcuve.3dm (36.5 KB) (10.8 KB) (20.5 KB)

Thank Mahdiyar. Very Elegant solution. What is the relay widget is good for in your definition?

Actually I need to undestand how subcurve is working…

The whole point of relays is to clean up the graph.

there is no graph here. …

any idea why subcurve does not work here?

Here we have one solution using Sub Curve. (10.8 KB)

1 Like

Another solution without reparametrization. (22.9 KB)

By graph, I mean the grasshopper definition.