Domain reset of a closed polycurve

Goodmorning everyone.
I routinely use the curveseam command to move the junction point and manipulate the position of one or more points on a polycurve closed with the CurveLength function and the subdomain argument.
Now I’m having problems in my script since the result of the returned length has different values ​​than the starting point. The polycurve in question is a square with a rounded corner. I tried to reparameterize the polycurve before running the process but I don’t get a domain reset with a value of 0 at its beginning. Anyone know if it can be solved by rhinoscripting ?. Thanks in advance for the suggestions.