Inkscape Community

Help Using Inkscape => Inkscape Beginners' Questions => Topic started by: stellatus on January 26, 2018, 03:53:16 AM

Title: Another dividing way
Post by: stellatus on January 26, 2018, 03:53:16 AM
How in automatic way to divide objects superimposed each other, so as to keep everything what is visible and remove everything what is hided?
In Inkscape look what I mean:
http://wolniludzie.com/inkscape/sp%C5%82aszczenie%20grupy%20obiekt%C3%B3w.svg
Title: Re: Another dividing way
Post by: Lazur on January 26, 2018, 04:38:23 AM
There is no such real option as per se. Or if you think about it there cannot really be such a substitute in every case nor would it be fitting for every need.

What if those objects are drawn with the 3D box tool? What should remain after the cut? Clearly they couldn't work as boxes after.

Also, if objects would be cut, the rendering gap issue would show in between them.

Having said that, you can achieve a similar result by creating a large raster image double (Ctrl+A to select all, Alt+B for the bitmap copy) and trace bitmap that image.
This won't place nodes exactly where they were nor can distinguish strokes from filled areas. Colour palette is limited to 256 colours and gradients nor transparency would work. Frankly it's a sloppy workaround but may suit your need.
Title: Re: Another dividing way
Post by: brynn on January 26, 2018, 05:17:09 AM
It looks like you found a way to delete the overlap, in the SVG image you provided.  Did you use Difference?  Are you asking how to do it all at once?

In that particular example, I don't know of any way to do it all at once.  It can only be one operation at a time.....as far as I know.
Title: Re: Another dividing way
Post by: stellatus on January 27, 2018, 04:13:39 AM
Quote
What should remain after the cut?
Only what we see.

Quote
Also, if objects would be cut, the rendering gap issue would show in between them.
Why?

Quote
Having said that, you can achieve a similar result by creating a large raster image double (Ctrl+A to select all, Alt+B for the bitmap copy) and trace bitmap that image.
This won't place nodes exactly where they were nor can distinguish strokes from filled areas. Colour palette is limited to 256 colours and gradients nor transparency would work. Frankly it's a sloppy workaround but may suit your need.
No, I reject this solution. You said very good: "it's a sloppy workaround".

Quote
It looks like you found a way to delete the overlap, in the SVG image you provided.  Did you use Difference?  Are you asking how to do it all at once?
Yes, I used Difference and I would like do it all at once.

Title: Re: Another dividing way
Post by: Lazur on January 27, 2018, 05:23:24 AM
Also, if objects would be cut, the rendering gap issue would show in between them.
Why?

Because semi-transparent pixels are not rendered in an "additive alpha" mode. It's a conceptual problem, not just inkscape-specific.
Here (http://www.inkscapeforum.com/viewtopic.php?f=6&t=33231) is a topic dedicated to the issue.
Title: Re: Another dividing way
Post by: brynn on January 28, 2018, 10:40:47 AM
Yes, I used Difference and I would like do it all at once.

In this case, it's not possible to do it all at once.

For example, if you have one object, in one position, which you want to use to cut through many other objects, then yes, there is a way to do it....more or less, all at once.  But in this case, even though all the ellipses are identical, the one which will be used for cutting through other different objects needs to be moved into different position each time.

In general, those path operations (booleans) can only work with 2 selected objects.  Union can be done with more than one selected object.  And sometimes Intersection can be done with more than one selected object.  But all the rest, only 2 objects....except....

We have a relatively new extension which will allow multiple boolean operations, when the situation is one object in one position, which needs to difference, division or cut path, through many other objects.  For these, you still have to wait for Inkscape to do them one at a time.  But at least you don't have to keep duplicating and commanding for each pair.  Here's a link to that extension:  https://inkscape.org/en/~Moini/%E2%98%85multi-bool-extension-cut-difference-division 

(Actually there's an upgrade for that, but I'm not sure it's working yet....  https://gitlab.com/su-v/inx-pathops  Someone recently tried to use it but got a traceback error with no results.  They gave up and went a different route.  But if you wanted to try it, I'm sure the authors would welcome your input, by reporting any errors, providing test file, etc.)
Title: Re: Another dividing way
Post by: Moini on January 28, 2018, 12:23:25 PM
The second extension is working, and it's better, as is said in the description of the first one.