addSegmentPoint = function(segment) {
            var segType = segment.pathSegTypeAsLetter.toUpperCase();

            // skip path ends
            if (segType === 'Z') 
                return;

            // map segment to x and y
            switch (segType) {

            case 'M':
            case 'L':
            case 'T':
            case 'C':
            case 'S':
            case 'Q':
                x = segment.x;
                y = segment.y;
                break;
            case 'H':
                x = segment.x;
                break;
            case 'V':
                y = segment.y;
                break;
            }

            addPoint(x, y, segment.pathSegType);
        }
Converts an SVG path into an array of vector points.
If the input path forms a concave shape, you must decompose the result into convex parts before use.
See `Bodies.fromVertices` which provides support for this.
Note that this function is not guaranteed to support complex paths (such as those with holes).
@method pathToVertices
@param {SVGPathElement} path
@param {Number} [sampleLength=15]
@return {Vector[]} points