workflow with multiple objects and boolean operations

Post questions on how to use or achieve an effect in Inkscape.
FRuzzo
Posts: 3
Joined: Thu Feb 23, 2017 10:20 am

workflow with multiple objects and boolean operations

Postby FRuzzo » Thu Feb 23, 2017 10:54 am

Hi,

Can aynone share any tips or shortcuts for the following sceanario? Say you have numerous objects and paths and you want convert them to a single path a to use a boolean operation, is there a way to quickly work get everything you want into one path? Often I'll get to stage where I've built up groups / objects / paths during the design process and I want to make that into one path, but the only way is to click through every object etc. and try and sort everything out and perform operations on two paths at a time until I finally get one path.

I should read up on the objects dialog which I've never used which may help me find what needs to done. Obviously boolean operations have to be two paths by nature, however, hoping somoneone has some tips on dealing with lost of paths / figuring out what needs to be converted to paths.

Thanks! :tool_spray

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: workflow with multiple objects and boolean operations

Postby brynn » Thu Feb 23, 2017 6:05 pm

Well, to follow what you're asking literally, I would Select All > Ungroup > Object to Path > Combine. But your 2nd paragraph gives me a little bit different idea.

There is a new extension which can work booleans on multiple paths at once: https://inkscape.org/en/~Moini/%E2%98%8 ... e-division. They still have to be paths. So you could not use it on groups. But once everything is a path, it's a big time-saver.

However, I'm still not sure that's the answer for you. Your description is too generalized to be able to understand clearly. Would you be able to share a typical SVG file with us, and explain what you want to do with it?

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: workflow with multiple objects and boolean operations

Postby theozh » Thu Feb 23, 2017 6:22 pm

Some time ago, I had (but still having) a similar issue.
viewtopic.php?f=5&t=18022

I am basically creating different layers and drawing there:
1) LayerAddConstruct: with all objects which I want to union later (I leave them here if editing/adustments might be necessary)
2) LayerAdd: duplicated objects of Layer 1) which are merged together (Path union)
3) LayerSubtractConstruct: with all object which I want to subtract later (I leave them here if editing/adustments might be necessary)
4) LayerSubtract: duplicated objects of Layer 3) which are merged together (Path union)
5) LayerFinal: duplicated paths from 2) and 4) and do "Path difference"

If I need to do changes/adjustments I start over in Layers 1) and 3).
You simply can hide/show layers as needed.
Pretty tedious, but haven't yet found a better way. If you find one please let me know.

In another post @~suv posted the link:
https://github.com/ryanlerch/inkscape-e ... difference
Maybe there have been changes/updates and it's useful for you.

...@Brynn, I just noticed, that's basically the same link ;-)
Win7/64, Inkscape 0.92.2

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: workflow with multiple objects and boolean operations

Postby Moini » Fri Feb 24, 2017 2:35 am

It's not the same - the link from Brynn includes multi-bool for more than difference (it adds Division and Cut path).

To me, it looks like the OP didn't know that Path -> Combine and Path -> Union do in fact take more than two objects. You can combine or union any number of objects.
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)

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: workflow with multiple objects and boolean operations

Postby theozh » Fri Feb 24, 2017 7:46 am

Sorry, @Moini, I didn't want to diminish your merits. I just read "Ryan Lerch's..." and saw the link
https://github.com/ryanlerch/inkscape-e ... difference
But it's a fork with more functionality.

If you have an idea how to do difference with several objects (instead of having to union them beforehand), please let me know.
Win7/64, Inkscape 0.92.2

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: workflow with multiple objects and boolean operations

Postby Moini » Fri Feb 24, 2017 8:43 am

theozh, this wasn't about the merits, just about the functionality being different.

After (roughly) skimming through that other thread, I'm not really sure what you want to achieve. You want to keep clones clones but still change each single clone to look different from the original? This doesn't make any sense, so I guess this isn't what you mean... :-/

Maybe you want to have a shortcut, that does the following for you:
- duplicate all objects in layer 'Add', unlink any clones, union.
- repeat for all objects in layer 'Subtract'
- now subtract the 'subtraction conglomerate' from the 'addition conglomerate'

Step 1 is:
Ctrl+A, Ctrl+D, Shift+Alt+D, Ctrl++

Step 2 is:
repeat on other layer

Step 3 is:
select both results, do Ctrl+-

I'd imagine this will only be done once, when you're done with your drawing.

If you need a preview, you could use Jabier's eraser layer filter.
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)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: workflow with multiple objects and boolean operations

Postby brynn » Fri Feb 24, 2017 2:49 pm

Well, let's not get too far away from the op's question. Even with theoz giving a different kind of description, I'm not clear if it's the same issue as the op. I'm not even entirely clear what the op is asking.

What we need is an example file, along with a clear explanation of the end goal (or image of the end goal).

FRuzzo
Posts: 3
Joined: Thu Feb 23, 2017 10:20 am

Re: workflow with multiple objects and boolean operations

Postby FRuzzo » Fri Feb 24, 2017 9:13 pm

Thanks for the replies. Sorry, I've been away from the computer.

Moini wrote:To me, it looks like the OP didn't know that Path -> Combine and Path -> Union do in fact take more than two objects. You can combine or union any number of objects.


This was the answer! I really had never used the combine function properly, so now I know... Thanks all. The extra info could also come in handy for workflow anyhow.

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: workflow with multiple objects and boolean operations

Postby theozh » Fri Feb 24, 2017 11:09 pm

OK, now it's clear.
@brynn, looking at the OP's question it is formulated pretty general.
FRuzzo wrote: Say you have numerous objects and paths and you want convert them to a single path a to use a boolean operation, is there a way to quickly work get everything you want into one path?
i.e. how do I do boolean operations with multiple objects?

If we limit just to "Union/Add" and "Difference/Subtract" you can list different cases:
Boolean.png
Boolean.png (2.99 KiB) Viewed 2043 times

Now, we know that the OP was referring to the "trivial" cases a), c), e) or g).
For case d) there is the "Multi-bool extension".
But what about cases f) and h)?
I don't see another way without to union the objects first and then do the difference.
This is especially annoying if you construct something which e.g. consists of rectangles, circles other geometrical objects, etc. which you easily want to change/adapt and generate again the boolean combination out of it. Therfore, I think a kind of a sketch layer is the best way I see.

@Moini, basically yes "just" a few mouse clicks and Short-keys. If you have a lot of objects this takes time. So instead of having 10 commands and wait after each command 1time, I would prefer to have one command and wait 1x10 times. And as you know, when you think the drawing is finished there will be certainly again some little changes necessary.
That's why I once asked for boolean operations on layers.

So the ultimate wish would be: LayerC = LayerA - LayerB
You do draw objects, paths, etc. on LayerA and LayerB and if you think you're done, just press "Update LayerC".
I guess this fits OP title very well, but we can continue the discussion here:
viewtopic.php?f=5&t=18022
Win7/64, Inkscape 0.92.2

FRuzzo
Posts: 3
Joined: Thu Feb 23, 2017 10:20 am

Re: workflow with multiple objects and boolean operations

Postby FRuzzo » Sun Feb 26, 2017 2:32 pm

So I've been experimenting with combine/breakapart and I'm not sure I fully understand the behaviouir. Hopefully this makes sence, sorry for the large images...In the first image I'm able to combine and break apart the shapes without any issue - the circle and rectangle connectors become seperate after break apart. The second is the fist image after PATH -> COMBINE. And then a seperate square placed above.

The third image is the result of the second image after selecting both objects INTERSECTION, then BREAK apart. As you can see each part is not seperate as before the intersection operation, it's now several combined objects (no idea why?) rather than each piece seperate as in before the intersection operation.
So just to clarify, I want to be able to break each object apart again as in the first image after applying the intersection.

I feel like I might missing something here. But I can't find much information on it.

breakapart.png
breakapart.png (27.43 KiB) Viewed 1996 times
breakapart.png
breakapart.png (27.43 KiB) Viewed 1996 times
intersection.png
intersection.png (14.26 KiB) Viewed 1996 times
Attachments
final.png
final.png (22.9 KiB) Viewed 1996 times

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: workflow with multiple objects and boolean operations

Postby brynn » Mon Feb 27, 2017 10:21 pm

It might be better if you could give us a test file. I can't reproduce your results in my own file. But there might be some things in your file, that I can't determine from looking at the PNG attachments.

I do notice that after breaking apart, in the last image, it looks like there are 5 separate objects, although 2 are absolutely tiny. But they are not what would be expected. So there must be something else happening, somehow.

Edit
What you're expecting here, should be what's happening. But I can't figure out what's going wrong, without the SVG file.

But in other cases, it's not so straightforward as that. Because with the intersection, Inkscape will try to close any paths that might have gotten "chopped off" by the intersection. So when you break it apart, you might have some new or different-looking things.

The path operations can be very confusing sometimes. One general way to think about it, is that they are working on the areas inside the paths, rather than the paths themselves. That's not across the board, because for example, Cut Paths does work directly on the paths. But for the others, most of the time it's working on the areas inside the paths.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: workflow with multiple objects and boolean operations

Postby tylerdurden » Mon Feb 27, 2017 10:42 pm

Ja, we need files... we can't tell if objects are open, closed or compound paths.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/


Return to “Help with using Inkscape”