Finding center curve of a tube like solid

 From:  Phiro
10098.22 
We have two methods.

For your special case, after cutting the cube (but it's optional to cut it), you could simply sweep a circle with the edge (created by the cutting) as the rail.
Why it is optional to cut ? if you use the function Curve/Project, you could create the rail withut cutting.

The second method is for to find the center curve.
You could use two opposite edges, then you loft between these two curves to have a surface.
Then with the ISO function, you have a center curve as you wanted.

I will post the file with step by step.