Finding center curve of a tube like solid

 From:  HansChristian
10098.1 
Hi everyone

Is it possible to get the center curve or generate one from a tube-like solid? I'm thinking of the possible curve used as rail when using the sweep-function (see below).




Problem:
I have a tube-like solid as pictured below (original) which I made a copy of (Tube) and tried to create the center line manually and then made a sweep with a circle as profile. This didn't go well and was also rather time consuming. At least I can't make it precise so it becomes usable.




The result I'm after is something like the following - I want to keep the shape of the curve but have a different surface and swap the new solid with the old one:




I know it is mathematically possible to get the center or centroid of a surface but is there a function or way to do it in Moi or get the same result with another approach?

In Wikipedia there is an article on how to find the center/centroid for surfaces bot concave and square-like etc. (just to show what I have in mind) https://en.wikipedia.org/wiki/Centroid#By_integral_formula





Last image is just the curve that I tried to model manually.





Any comments or suggestions is highly appreciated

Thanks a lot!