Help need math concept for good hedge orientation

I'm working on script for creat e strip(like Sweep tool) with tow splines constain.
but my problem is the placement of my knots on this splines for create an uniform
mesh. I using lengthInterp for placing my knots but when i have curve in my tow spline
i've bad result can you give me the good way for have a good interpolation of my knots on splineshape.

in first the script part
and the second file show the good way for me.


towsplinetomesh.ms1.36 KB
screenshot_187.jpg72.59 KB