I have a path, which has a number of nodes. I select some of the nodes with node-selection tool. I would like to be able (programmatically) get the coordinates of the selected nodes. I saw the path itself is encoded something like:
Code: Select all
<path
id="path870"
d="m 702.41652,705.5811 v 0.0156 h -0.0156 v 27.01954 h 0.0156 z"
style="fill:none;stroke:#000000;stroke-width:1.88976383"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
I also see that the ids of the selected nodes are in the form of "path870:0:5". However, how do I map from the inside-path-id to the actual positions? These ids (5 in the example) are bigger than the number of nodes in the path, so it's not only the matter of taking the k-th node from the path.
I realized that if I click "Break path at selected nodes" and then "Break apart", I'll separate the selected nodes into a separate path, from which I can take all the nodes' coordinates. However, I wasn't able to find how to do "Break path at selected nodes" programmatically either :/
Any hints?
Note that the questions is different from asked in viewtopic.php?t=11620 , as I'd like to have the position of the particualar nodes (as opposed to all of them from within a path).