Script for convert curve to arcs and lines

Hi Willem,

Would you mind sharing your script. I was just about to write my own, but thought I should make a search here before I put my mind to it.

Cheers