Inkscape.org
Beyond the Basics Export PATH to xy coordinates with
  1. #1
    prateek dev prateek dev @prateekrajgautam.dev

    Each path is defined by some points and it is drawn by connecting those points.

    if we want to get samples of the path at a regular distance how can we do it?

    Inkscape must be doing it internally.

    But it there any function to export (XY) coordinates of a path to excel or CVS.

    there is a function to plot path from 2d points, is there any way or function to do the reverse.

     

    path/SVG to Coordinates.

     

  2. #2
    Martin Owens Martin Owens @doctormo🌹🧀

    You could write a python extension to do this pretty easily in the 1.0 API, it would be a matter of looping through the path's points and printing them to the output (which would be a csv file)

  3. #3
    Maren Hachmann Maren Hachmann @Moini

    1. There is an extension that creates nodes in regular intervals. Find it at Extensions > Modify Path > Add nodes.

    2. There is an extension that exports a path's nodes coordinates for 0.92.4, find it at https://inkscape.org/~simarilius/%E2%98%85inkscape-exportxy-master

  4. #4
    Maren Hachmann Maren Hachmann @Moini

    Direct link: https://github.com/jwcliff/Inkscape_Exportxy

    (extension has last been updated two months ago)

  5. #5
    brynn brynn @brynn

    I think there's an extension specifically for CSV.  ut I can't seem to find it right now.  As soon as I find it, I'll post.

  6. #6
    brynn brynn @brynn

    Well, someone else had to find it for me.  But here's one:  https://alpha.inkscape.org/vectors/www.inkscapeforum.com/viewtopicdb3f.html

    And here's another:  https://github.com/tbekolay/csv_output

  7. #7
    theozh theozh @theozh
    *

    Hi, I tried the above mentioned extension to export nodes as x,y coordinates. I installed it and it appears under Extensions | Export | Export XY

    When I have selected a curve and start this extension a window flashes saying "Export XY working, please wait..."

    There is no error message. But I can't find a file. Where is the file stored? Thanks for any hints.

     

    Exportxy
  8. #8
    Maren Hachmann Maren Hachmann @Moini

    There is no file generated by the extension, the result is supposed to be displayed in an error message. However, that extension has not been updated since Inkscape 0.92.4, apparently. It's a bit of a surprise that it starts at all, tbh. Use it with Inkscape 0.92.4 or update it (or find someone who will do that for you).

  9. #9
    theozh theozh @theozh

    Thank you for the hint. However, I just downloaded Inkscape 0.92.4 and installed/unpacked it. Copied the .inx and .py files into the extensions directory. Same behaviour as before. Now, the same message flashes so fast that I even can't read it. No error message, but also no XY results, nowhere :-(

  10. #10
    inklinea inklinea @inklinea⛰️

    In ExportXY.inx just comment out the following lines, should work.

     

    <!--    <dependency type="executable" location="extensions">ExportXY.py</dependency>-->
    <!--   <dependency type="executable" location="extensions">inkex.py</dependency>-->

     

  11. #11
    theozh theozh @theozh

    @inklinea  I commented out these lines. But sorry, no change, no xy-coordinates...

  12. #12
    inklinea inklinea @inklinea⛰️

    The version that I used is this one https://github.com/Simarilius-uk/Inkscape_Exportxy

    With the commented out lines works for me in Inkscape 1.2.2

  13. #13
    theozh theozh @theozh

    Now,I guess I have tried all 6 combinations: Inkscape 0.92.4, Inkscape 1.1 (which I originally had), updated to Inkscape 1.2.2

    Commenting out the lines (and original) in the .inx file

    Now, in Inkscape 1.2.2, the same window pops up, but now it takes much longer, but still no xy-coordinates.

    I am using the "portable" version of Inkscape (i.e. simply unpacked the compressed 7z archive) 64bit under Win10. Is there something wrong with this?

  14. #14
    theozh theozh @theozh
    😀

    Argh, I'm very sorry.... In order to test the xy-coordinates export, I've always quickly drawn a rectangle. However, I have to convert the rectangle first to a path! Then Export XY works, gives the coordinates back in a window. I suspected that it must be something "stupid".

    Exportxy Rectangle
  15. #15
    Maren Hachmann Maren Hachmann @Moini

    Yeah. It only exports the coordinates of nodes. A shape (rectangle, circle) doesn't have any nodes.

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Export PATH to xy coordinates with