score:0

I would suggest you to use this instead:

//assume pathElement hold the path instance.
var pathElement = <your path instance>
var segments = pathElement.pathSegList;
//segments will hold the array of SVGPathSegLine

Related Query

More Query from same tag