I am dealing with a closed curve in Rhinoscript that is trimmed to an open curve.

The curve is oriented that it goes from smaller values to larger values, but now the start point has a large negative number in the curve domain (-160) and the end point a curve parameter near zero (-2).

I would like to keep going from small to large but reparametrize the curve that the start point has value 0 and the end point a value like +160. How can I do this?

The problem is more one for backward compatibility of the code, since the older code assumed that curves start with a curve parameter at 0 and increase when following the curve to the end.

Today, I had a curve that started at -160 and went to 0. This is the correct direction: smaller values near the beginning, larger towards the end, but it would be nicer to let the beginning of the curve coincide with 0 and let the curve parameter increase to the end point for the curve direction of my choice. It would have saved me a couple of hours work today replacing our legacy code…