Closed peteruithoven closed 9 years ago
jscut uses snap.svg, a competitor to svg.js.
Alright, but maybe you can implement the toPath plugin into snap.js. https://github.com/wout/svg.topath.js/blob/master/svg.topath.js This converts all shapes to paths, except text for example.
Also, the toPoly plugin includes existing vector points and skips straight parts to improve the result.
Hi folks, In collaboration with the maintainer of the svg.js library I've been able to make it very easy to import and parse svg files. We worked on making importing and converting all shapes to polygons as simple as:
This imports the contents of a svg file into a svg, converts all shapes (eclipse, rects etc) into path's and then converts all paths into polygons. The import functionality supports Illustrator and Inkscape files. toPoly also subdivides curves into straight lines by a determined sample rate (in this case 2px).
This uses svg.js, import, toPath and toPoly
We still have to work on ungrouping: https://github.com/wout/svg.js/issues/238
Maybe this is something you can use?
By improving the existing svg.js library and plugins I hope to make it easier for others to build other digital fabrication interfaces, like your jscut. My personal goal is to use these webbased interfaces for another project: Tosqa