Finding center curve of a tube like solid

 From:  Phiro
10098.30 In reply to 10098.25 
@Pilou

>>> A simple circle by 3 points taken on the cubic "tube" Sweeping on a internal perimeter is not sufficient ?
>>> And you can adjust the radius/diameter of the final tube in real time at the end after the sweep...

I think, because of the cutting made in the problem presented, the cubic tube don't have a regular section square.
So it doesn't match .

When I tested it, it didn't match.
I tested a double rail too, and the size if circle was not regular.