xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub! svg-path-to-polygons & svg-path-parser svg polygon to path

svg-path-to-polygons

https://www.npmjs.com/package/svg-path-to-polygons

https://github.com/Phrogz/svg-path-to-polygons/blob/master/svg-path-to-polygons.js


const { pathDataToPolys } = require('../svg-path-to-polygons.js');

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] ]
]
*/

svg-path-parser

https://www.npmjs.com/package/svg-path-parser

https://github.com/hughsk/svg-path-parser#readme

https://www.npmjs.com/package/svg-path-parse

https://github.com/convertSvg/svg-path-parse

https://www.npmjs.com/package/@types/svg-path-parser

svg-pathdata

Parse SVG PathDatas

https://www.npmjs.com/package/svg-pathdata

https://github.com/nfroidure/svg-pathdata#readme


https://svgjs.com/docs/2.7/plugins/svg-path-js/


svg polygon to path

demo

xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
svg-path-to-polygons & svg-path-parser
svg polygon to path

http://phrogz.net/svg/convert_polys_to_paths.svg

https://*.com/questions/10717190/convert-svg-polygon-to-path