Midpoint of a curve?

 From:  bemfarmer
5165.1 
Is there a script to find the midpoint of a curve?

For open curves, which are symetrical, and planar, with the UnwrapCurve script a line perpendicular to its midpoint seems to
locate the midpoint of the curve. Does not work for flat helix, nor for 2d logarithmic spiral.