I have hacked up a quick extension[1] to apply a series of boolean ops on a selection of 2 or more objects.
Basically, it just takes the top path in the z-order of the selection, duplicates it, and applies a difference between that shape and each of the shapes underneath. I have frequently (in the past) done this by hand, duplicating shapes, applying the op, and repeating over and over again.
This is my first attempt at an extension, and i am calling the inkscape binary from the python script so i can use the verbs availble on the command line. However, i'm unsure how to get this result back into the inkscape window that called the extenstion. (currently a new window opens with the temp SVG in it)
any thoughts on how to do this kind of thing in a better way?
cheers, ryanlerch
[1] - https://github.com/ryanlerch/inkscape-extension-multiple-difference
On 2014-10-24 05:12 (+0200), Ryan Lerch wrote:
I have hacked up a quick extension[1] to apply a series of boolean ops on a selection of 2 or more objects.
Basically, it just takes the top path in the z-order of the selection, duplicates it, and applies a difference between that shape and each of the shapes underneath. I have frequently (in the past) done this by hand, duplicating shapes, applying the op, and repeating over and over again.
This is my first attempt at an extension, and i am calling the inkscape binary from the python script so i can use the verbs availble on the command line. However, i'm unsure how to get this result back into the inkscape window that called the extenstion. (currently a new window opens with the temp SVG in it)
any thoughts on how to do this kind of thing in a better way?
Maybe this example can help: http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/share/ex... (see run_document() and run_file())
cheers, ryanlerch
[1] - https://github.com/ryanlerch/inkscape-extension-multiple-difference
On 2014-10-24 05:46 (+0200), su_v wrote:
On 2014-10-24 05:12 (+0200), Ryan Lerch wrote:
I have hacked up a quick extension[1] to apply a series of boolean ops on a selection of 2 or more objects.
Basically, it just takes the top path in the z-order of the selection, duplicates it, and applies a difference between that shape and each of the shapes underneath. I have frequently (in the past) done this by hand, duplicating shapes, applying the op, and repeating over and over again.
This is my first attempt at an extension, and i am calling the inkscape binary from the python script so i can use the verbs availble on the command line. However, i'm unsure how to get this result back into the inkscape window that called the extenstion. (currently a new window opens with the temp SVG in it)
any thoughts on how to do this kind of thing in a better way?
Maybe this example can help: http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/share/ex... (see run_document() and run_file())
Forgot to add another example (predating the one from the synfig exporter): http://www.janthor.com/sketches/index.php?/archives/5-Inkscape-calling-Inksc...
cheers, ryanlerch
[1] - https://github.com/ryanlerch/inkscape-extension-multiple-difference
participants (2)
-
Ryan Lerch
-
su_v