title: Convert SVG path to polygon coordinates
body: <p>I need a function or plugin that converts path commands for an SVG path to polygonal points.</p>
  
  <p>I found one : <a href="https://github.com/Phrogz/svg-path-to-polygons" rel="noreferrer">https://github.com/Phrogz/svg-path-to-polygons</a></p>
  
  <p>The problem here is it does not support arcs and curves like A and C.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>let pathData = 'M5,15 c5.5,0 10-4.5 10,-10 h10';
  let points = pathDataToPolys(pathData, {tolerance:1, decimals:1});
  console.log(points);
  /*******************************************************************
  [
    [ [5,15],[7,14.8],[10.6,13.3],[13.3,10.6],[14.8,7],[15,5],[25,5] ]
  ]</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have path as 'M0 0 H50 A20 20 0 1 0 100 50 v25 C50 125 0 85 0 85 z'. I need this to be converted to polygon points.</p>
  
  <p>Any help or suggestions highly appreciated.</p>