I need to convert paths from SVG file to polygons with points, how can I do that in Inkscape? It is possible to do this using an online converter, but I have more than 250 paths in the file, and changing this in the txt file is ineffective. The problem is that the path forms a view frame around my polygon (see attached image). I am using paths in another program where I put multiple labels on the path and when I center the label it turns out not to be the center of the polygon but the center of the rectangular viewport. This doesn't happen when I use polygons.
A node package which converts paths to polygons. I does not work on quadratic or elliptical curves, but for simple beziers / lines etc it seems quite good.
Anyway, I browserified it and uploaded it.Β
It should loop through all paths in an svg and convert them to polygons.
I've updated it now, so that it sneakily replaces the paths with polygons keeping the original svg structure , and can still keep all the original attributes (style etc )Β
I need to convert paths from SVG file to polygons with points, how can I do that in Inkscape? It is possible to do this using an online converter, but I have more than 250 paths in the file, and changing this in the txt file is ineffective. The problem is that the path forms a view frame around my polygon (see attached image). I am using paths in another program where I put multiple labels on the path and when I center the label it turns out not to be the center of the polygon but the center of the rectangular viewport. This doesn't happen when I use polygons.
Are the files originating in Inkscape? It looks like Inkscape actually uses paths to make pseudo-polygons.
250 paths in the file or 250 files with paths in ?Β
I found a pageΒ https://www.npmjs.com/package/svg-path-to-polygons
A node package which converts paths to polygons. I does not work on quadratic or elliptical curves, but for simple beziers / lines etc it seems quite good.
Anyway, I browserified it and uploaded it.Β
It should loop through all paths in an svg and convert them to polygons.
https://www.raincloud.co.uk/svg/paths2polygons/paths2polygons.html
Many thanks :)
I've updated it now, so that it sneakily replaces the paths with polygons keeping the original svg structure , and can still keep all the original attributes (style etc )Β