I'm new to writing Inkscape extensions and writing Python code in general.
My first project is an extension to reformat SVGs exported from FreeCAD.
I already managed ungrouping all objects (with modified code from "deep ungroup" extension) and assigning a desired stroke-with to stroked pathes and a desired color to filled paths.
Now I want to combine (Ctrl K) all stroked paths and unite (Ctrl +) all filled paths.
How can I do that?
Here is the last part of my code:
for node in self.ungroupedNodes:
if('stroke' in node.style and node.style['stroke'] != 'none'):
node.style['stroke-width'] = 1.2
# code for combine here?
if('fill' in node.style and node.style['fill'] != 'none'):
node.style['fill'] = 'red'
# code for union here?
I'm new to writing Inkscape extensions and writing Python code in general.
My first project is an extension to reformat SVGs exported from FreeCAD.
I already managed ungrouping all objects (with modified code from "deep ungroup" extension) and assigning a desired stroke-with to stroked pathes and a desired color to filled paths.
Now I want to combine (Ctrl K) all stroked paths and unite (Ctrl +) all filled paths.
How can I do that?
Here is the last part of my code: