Extension: Print x, y coordinates of path nodes

Other sites and resources for Inkscape users.
toxigames
Posts: 149
Joined: Sat Aug 17, 2013 7:28 pm

Extension: Print x, y coordinates of path nodes

Postby toxigames » Mon Jun 20, 2016 7:51 am

Some time ago I modified an extension (original extension ExportXY from here http://www.inkscapeforum.com/viewtopic.php?t=8826) such that it can gather and print the x,y coordinates of a path, and convert and implement the results into Game Maker code /Game Maker coord system for creating a physics edge (for easy productive work in this specific task). It can very easily be modified to just print the x,y coordinates, if there is no desire for Game Maker code. So I thought I'd just share it if anyone has a use for this.

Instructions and limitations:

Copy the content of zip file into Inkscape\share\extensions
Select the path only and run the extension from Extensions -> ExportGuiXYds_grid_set -> ExportGuiXYds_grid_set
Note that path must fulfill all of the following requirements:
- only straight lines
- only corner nodes
- best to use exact node coordinates, no guarantee decimals will work (although they will be rounded, so they might still work)
- y/x-coordinate of first node in path must be input manually by user when extension run. If nodes are added to the path in front of the first node, extension won't work (as of yet I don't know how to fix this). Adding nodes after the first node should work fine.
- merging paths ("join selected end nodes") wont work
- closed (looped) paths should work
- document height must be exact, no decimals

The extension works in Inkscape 0.48. 0.91 is not supported unfortunately.

Download: https://www.dropbox.com/s/unlr2vi7fhm3hjc/ExportGuiXYds_grid_set.zip?dl=0

2016-06-19 23_43_03-ground_010_1024x359.svg - Inkscape.png
2016-06-19 23_43_03-ground_010_1024x359.svg - Inkscape.png (190.54 KiB) Viewed 13202 times


---------
If anyone believes that I don't have right to share this extension because it was based upon an existing extension (from 2008), please let me know. I take no credit for the original ExportXY extension, I just wanted to share my modification since I haven't found any other extensions that can exactly do this.

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: Extension: Print x, y coordinates of path nodes

Postby Simarilius » Tue Jun 28, 2016 6:10 am

Nice! bit of an improvement on the hacky bit of code I posted :)

And you have my complete approval for doing whatever the heck you like with it. I based it on someone elses code as that thread said, and he was happy for it to be used when I asked.

toxigames
Posts: 149
Joined: Sat Aug 17, 2013 7:28 pm

Re: Extension: Print x, y coordinates of path nodes

Postby toxigames » Tue Jun 28, 2016 9:15 am

Thanks for giving me the ok! :)

blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Re: Extension: Print x, y coordinates of path nodes

Postby blurymind » Sat Aug 11, 2018 12:12 am

Can an inkscape extension merge 2 nodes from an array at all?


Return to “Inkscape Resources”