Find centerline of irregular shape

I want to find the center-line of any irregular shape.

It’s easy to look at the shape and recognize how to find this line by hand, but how can i do it with grasshopper?

I feel like it has something to do with progressively offsetting and tracing the points where lines overlap:

Hi, have a look at this: Old Town Roofs