added amethod to compute the length of the spline