The extension system does not naturally have access to the functions which you use in the GUI.
It has its own system of xml / svg manipulation.
You can access many of the gui functions, however it requires a 'command call' in which Inkscape is called invisibly the background, operates on a temp file and returns the result.
Hi,
I'm really bored.
How can i do that ?
I believe combine path just combines 'd'
Make a couple of layers.
Draw two paths in the first layer, select, copy.
Then Edit>Paste in place in the second layer.
Combine those two paths, save and compare the contents of both layers.
Of course it would have to be 'like with like' so relative with relative or absolute with absolute.
https://inkscape.gitlab.io/extensions/documentation/source/inkex.paths.html
I believe combine path just combines 'd'
Make a couple of layers.
Draw two paths in the first layer, select, copy.
Then Edit>Paste in place in the second layer.
Combine those two paths, save and compare the contents of both layers.
Of course it would have to be 'like with like' so relative with relative or absolute with absolute.
https://inkscape.gitlab.io/extensions/documentation/source/inkex.paths.html
Actually,
I'm looking for a small piece of code to write.
For example
combine(self.svg.getElementById("layer1"))
But of course the above code doesn't work.
Do you know of any code that works like this ?
And addition you know shortcut of combine is ctrl+k in inkscape.
Maybe you know a code where i can run the shortcut with python ??
The extension system does not naturally have access to the functions which you use in the GUI.
It has its own system of xml / svg manipulation.
You can access many of the gui functions, however it requires a 'command call' in which Inkscape is called invisibly the background, operates on a temp file and returns the result.
Here is a thread which discusses something similar https://inkscape.org/id/forums/extensions/extension-to-call-path-simplify/
However - path/combine should be possible manually by simply joining 'd' strings provided you are not mixing relative and absolute paths.
Hi, thank you for your answer but objects what i want to do combine unfortunately are line objects.
Firstly i need to convert path these objects.
But i still haven't converted to path they with any code.
I guess this cannot be done directly with code. :(
thanx alot again your answers inklinea