Extension: Print x, y coordinates of path nodes

Other sites and resources for Inkscape users.
toxigames
Posts: 141
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 5341 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: 622
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: 141
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! :)


Return to “Inkscape Resources”

Who is online

Users browsing this forum: No registered users and 4 guests