Hallo Jens,
if you'd like to use a 'safe' extension that has been released under the GPL, try https://gitlab.com/su-v/inx-debug/tree/master/src (selected_nodes.py + .inx)
I've just tested it with Inkscape 1.0, and it still works (with a couple warnings, but they can be ignored).
For the one you already have... maybe ask in the forums? Who was the author? I suppose there's no license given in the python file?
In Inkscape 1.0, the coordinates displayed in the program will better match those printed out by the script (the Y axis will be inversed). Will that be enough for your purpose, or do you need the y axis in a specific direction?
Regards Maren
Am 01.11.19 um 15:37 schrieb Jens Lallensack:
Dear all,
I am palaeontologist at the University of Bonn, Germany, focusing on fossil dinosaur footprints and trackways. I regularly use Inkscape for my research (for measuring, data extration, and drawing of interpretive outlines), and have cited this software in several of my papers.
I am currently working on a methodological paper on how to analyze fossil footprints based on 3D models. The approach I will present in this paper includes Inkscape as an important component. The idea is to import raster images into Inkscape (different graphical 2D representations of the 3D model), align them into an image stack, and draw interpretive outlines on a separate layer. I use the Bezier curves tool to collect a number of landmark coordinates from the separate footprints, which I then export to automatically calculate a large number of measurements for statistical analysis. The paper is to be published in a peer-revied journal (currently, I have the Journal of Palaeontological Techniques in mind, https://www.jpaleontologicaltechniques.org/).
I already used this method in a recent paper (https://www.tandfonline.com/doi/abs/10.1080/02724634.2018.1512501) to rapidly collect measurements of a larger number of trackways. The aim of the new methodological paper is to improve this method and to make it available to our comunity of footprint researchers. However, there are two open issues/questions regarding Inkscape. I was wondering if you could give me some advice here.
Export of path node coordinates is, unfortunately, currently possible only via a plugin, which adds an additional hitch (but I understand that research is not the focus of Inkscape). Such a plugin was posted on the Inkscape Forum in 2011, with improvements added by different members (https://www.tandfonline.com/doi/abs/10.1080/02724634.2018.1512501). I simplified the code so that it returns node coordinates only (and not those of the handles), see code below.
Now to my questions:
- I need to cite the modified coord export script in my paper, and make
sure that it stays available. I assume that code published in the forum is not automatically released under a free licence, and that I cannot simply distribute the script together with the paper. A possibility might be to post the modified script to the forum and provide the link in the paper. This is only an option if the link remains available for a longer time (I cannot modify the paper once published). What would be the optimal way?
- The coordinates given by the script need to be mirrored and
translated to match the coordinates displayed within Inkscape itself. I would need to improve the script so that this is done automatically. I'm not into python scripting, but would try to figure this out. Any help/hints with this would be much appreciated.
Thank you very much in advance.
Kind regards, Jens Lallensack
----- xyexport.py -------
#!/usr/bin/env python
import inkex import sys import simpletransform import cubicsuperpath
class TemplateEffect(inkex.Effect): def __init__(self): inkex.Effect.__init__(self) def effect(self): for node in self.selected.iteritems(): output_all = output_nodes = "" for id, node in self.selected.iteritems(): if node.tag == inkex.addNS('path','svg'): output_all += "" output_nodes += "" simpletransform.fuseTransform(node) d = node.get('d') p = cubicsuperpath.parsePath(d) for subpath in p: for csp in subpath: output_nodes += str(csp[1][0]) + "\t" + str(csp[1][1]) + "\n" sys.stderr.write(output_nodes) effect = TemplateEffect() effect.affect() _______________________________________________ Inkscape Devel mailing list -- inkscape-devel@lists.inkscape.org To unsubscribe send an email to inkscape-devel-leave@lists.inkscape.org