How does Inkscape handle nodes in scripting? Or can the nodes be written out in some way? Or perhaps there is a better place to ask about this:
I have a simple manual clicking routine that seems a good candidate to automate using Inkscape scripting:
Draw one circle.
Move the circle so the center snaps onto the first node in a list.
Repeat for the next node until the number of nodes is reached.
This works so far, thus my interest in Inkscape, however, there are a number of problems that I think will be solved if the nodes are worked with differently. I have read/tried:
... as well as the documentation. So far, SimpInkScr works great but apparently does not work with nodes. I wonder if perhaps Inkscape can somehow write out nodes as points in a file to work with outside Inkscape.
Inkscape v 1.1.2
Ubuntu Linux 22.04.2
SimpInkScr: not sure of the latest version number, but it is as of Feb. 21, 2023.
I also just found:
.. if this is outside the scope of this user group, I apologize - perhaps Stack Overflow is better - but back to the svg question :
I can put circles around nodes in a path by editing the svg file. there are pairs of coordinates. This will work perfectly with command-line tools (
awk,sed,bash,..) if the relationships between "m", "c", "l",.. and the pairs of coordinates can be maintained. I will try to put an example image up of a testing case - with an errant circle.
relevant svg code snippet for the above image:
<!-- the circle is here Inkscape gui says: x,y = 50.000,50.000 mm W,H = 120.000,120.000 mm 110.000,110.000 is center and a line node 110.000,230.000 is where the line ends --> <circle style="fill:none;stroke:#ff0000;stroke-width:0.262654" id="path846" cx="110" cy="110" r="59.868671" /> <!-- another circle centered on the end of the line with 2r --> <circle style="fill:none;stroke:#ff0000;stroke-width:0.262654" id="circle5" cx="110" cy="230" r="120" /> <!-- try circles centered on things --> <circle style="fill:none;stroke:#ff0000;stroke-width:0.262654" id="circle6" cx="154.68248" cy="194.63248" r="30" /> <circle style="fill:none;stroke:#ff0000;stroke-width:0.262654" id="circle6" cx="" cy="" r="30" /> <!-- now the path with some nodes --> <path style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 110,110 38.04426,11.79937 6.63822,72.83311 L 110,230" id="path1062" sodipodi:nodetypes="cccc" /> <!-- end of path with some nodes -->