Divide curve fixed segments and optimized way

it is quite simple to do what you want, at each new point test the longest line and measure its distance to the curve, if max distance is more than tolerance take a shortest curve. When distance is just less than the tolerance or it is the last one take this line.
Just one thing it will be impossible to end exactly on the end of the curve !!
But it will be more simple to do it with python or C#