StairsPath to line/curves

Hi,

Have you seen this post ? It seems like it does what you want.