Hello,
I have a file where I have some groups with paths underneath (~20 groups each containing 2 to 40 path) that I need to union to make one single path.
I am looking to do this through a Python plugin but could not figure out how to union multiple path through python.
How can I achieve this?
Thanks,
Tieum
Inkscape Python Union
Re: Inkscape Python Union
There's a multi-ungroup extension here: https://github.com/cw/inkscape-ungroup-deep
(but instead of downloading, installing, restarting, then finding and using the extension to ungroup, it might be quicker to just select the groups (all of them), hit Ctrl+U or Ctrl+Shift+G to ungroup repeatedly until the status line no longer says that there are groups in the selection. Then just keep everything selected and hit Path -> Union.
In case not everything is a path, do 'Path -> Object to Path' before the union.)
(but instead of downloading, installing, restarting, then finding and using the extension to ungroup, it might be quicker to just select the groups (all of them), hit Ctrl+U or Ctrl+Shift+G to ungroup repeatedly until the status line no longer says that there are groups in the selection. Then just keep everything selected and hit Path -> Union.
In case not everything is a path, do 'Path -> Object to Path' before the union.)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: Inkscape Python Union
I almost posted a nearly identical reply earlier (except I was thinking Union or Combine, after entering the group). But after re-reading a few times, I got the impression Tieum wants to write a new extension.
It was because of "....how to union multiple path through python." that made me think that. But I'm not sure if Python is responsible for Union and Combine. I know that most extensions use python. But I don't know how it works on the canvas (Path menu > Union or Combine).
It was because of "....how to union multiple path through python." that made me think that. But I'm not sure if Python is responsible for Union and Combine. I know that most extensions use python. But I don't know how it works on the canvas (Path menu > Union or Combine).
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Inkscape Python Union
The python extensions can either 'talk' to Inkscape and ask it to do something using the built-in Inkscape routines, or they can make the changes in the document themselves. So, both are possible 
Not sure why this would need an extension, if it's only a single file that needs editing, that's why I started with the easy part

Not sure why this would need an extension, if it's only a single file that needs editing, that's why I started with the easy part

Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)