Recent

Author Topic: simple svg reader  (Read 132 times)

krolikbest

  • Full Member
  • ***
  • Posts: 110
simple svg reader
« on: November 12, 2019, 08:33:15 pm »
Hello,

 because I had problems to read and incorporate svg vectors into my main program from other svg readers (in fact still have no idea how I can read in fpvectorial a bunch of points forming vectors) so I've decided to write my own simple svg  reader as a library. How to use it you'll find it in attachment.
First of all one must transform all curves in svg drawing into straight lines (see sample 3 files, if not then crashes).I think that the best solution is to use Inkscape for that purpose, there you can add additional nodes befor transformation and all transformed 'curves' look then smoothly. Than you can use 'Object to path' in Inkscape in order to gather all point in one place.
I did it in order to read svg paths for cnc machine. My intention was not to reproduce svg drawing with all attributes. Maybe someone find it useful.