How to calculate the area of duct divide by space

I want to calculate area of duct divide by space(or zone or mass).

There is sample dynamo below.
http://bim-design.com/learning/file/201019_Duct_Calculate_Surface_Area.zip
This dynamo divides ducts with space.(this zip contains sample file .rvt)
But I do not want to divide duct by the surface of space which is parallel as centerline of duct.

At first I want to get the centerline of a duct.
Is there some kind of node or method can get centerline of a duct?

(Then I want to divide the centerline with the space. Because centerline will not divide with the space which is parallel as centerline)