# Boolean operations on multiple selections

## Recommended Posts

Given a circle C and a series of concentric squares A1, A2 etc, I would like C to cut across A1...An right down the middle and apply a subtraction on all of them.

If I select all of them and try to do it wholesale, it applies as if A3-(A2-A1) etc, when what I really want is (C-A1) U (C-A2) etc.

I have attached pictures of the setup and what I actually want. When I apply a grouped subtraction, everything gets deleted, obviously.

Is there a simple way of doing this?

Thank you,

craftybones

##### Share on other sites

When you´re combining the squares before the Boolean subtract the result is looking like this:

If that´s what you´re after.

Cheers

P.

##### Share on other sites

1. Marquee-select all of the objects

2. Click on 'Divide' on the Geometry toolbar

3. Marquee-select the circle

4. Press the Delete key on your keyboard

Alfred
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro

##### Share on other sites

Mmmh - are you sure he wants 18 individual objects? Just curious.

Cheers

P.

##### Share on other sites

Mmmh - are you sure you get 18 individual objects? Just curious.

Alfred
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro

##### Share on other sites

You´re right; it´s 48 actually by dividing these 4 Elements selected with the circle on top:

When the squares are on top it´s just 7 BTW:

Cheers

P

##### Share on other sites

When I did it I got 37 objects, which is why I said to marquee-select the circle instead of just clicking on it. There were 33 objects inside the circle, so deleting those together with the enclosing circle left me with the three objects that you see in my later screenshot.

Alfred
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro

##### Share on other sites

Using Alfred's method, at step 2, I get 7 objects:

Because I have AD set for the marquee to select anything it touches, for this particular arrangement if I were to marquee select the circle in his step 3, I would delete some of three desired shapes, but it is easy enough to select just the C-shaped object, delete that & then do the same with a marquee select of the remaining three lefthand ones.

EDIT: When I first did this, the ellipse (circle) shape was at the bottom of the layers panel & I got 7 shapes from the Divide action. After reading the other replies about getting a different number of shapes, I tried moving the circle to the top & that resulted in 29 shapes! I never did get 37 shapes, regardless of the layer order I tried, so I think there is some kind of bug in the Divide action...

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

##### Share on other sites

There is a difference in the resulting number of objects just by different types of selecting? Are you sure this isn´t a bug?

What ever it takes I still have no clue what kind of shape the user is after.

Cheers

P.

##### Share on other sites

I don't really understand why the layer order makes such a big a difference in the number of objects that result from the divide operation.

PixelPest, in the Tools preferences for AD, I have the "Select object when intersects with selection marquee" option selected, so when I drag out a marquee every shape it touches is selected. Without that option enabled, only objects completely enclosed by the marquee are selected.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

##### Share on other sites

I don't really understand why the layer order makes such a big a difference in the number of objects that result from the divide operation.

Stacking (Z-order) is essential for Boolean operations in SVG-apps - especially for subtracting.

Cheers

P.

##### Share on other sites

• Staff

The number of objects created varies with the layer position and the size of the objects.

There's already a few bugs with boolean operations logged. Hopefully this will be improved/fixed as soon as there's time to revamp/review the boolean operations code.

##### Share on other sites

I don't really understand why the layer order makes such a big a difference in the number of objects that result from the divide operation.

Me too neither, but that's presumably covered by the list of bugs that MEB mentioned.

PixelPest, in the Tools preferences for AD, I have the "Select object when intersects with selection marquee" option selected, so when I drag out a marquee every shape it touches is selected. Without that option enabled, only objects completely enclosed by the marquee are selected.

Perhaps I should have mentioned that I'm using the default setting, where that option isn't enabled (so marquee-selecting the circle selects only the circle and the objects which are completely contained within it).

Alfred
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro

##### Share on other sites

PixelPest, I am only concerning myself with the Divide boolean in AD for this. Subtraction seems to work as expected regarding stacking/z-order, but not Divide.

For example, when I selected only three unfilled concentrically arranged square shapes with no other overlapping shape in the canvas & applied Divide, I got 5 shapes because the two inner squares were duplicated. I would expect in this case for the divide operation to have no effect.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

##### Share on other sites

Stacking (Z-order) is essential for Boolean operations in SVG-apps - especially for subtracting.

Cheers

P.

Stacking order is essential for determining what is subtracted, but (as far as I can see) it shouldn't make any difference to any of the other Boolean operations.

Alfred
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro

##### Share on other sites

PixelPest, I am only concerning myself with the Divide boolean in AD for this. Subtraction seems to work as expected regarding stacking/z-order, but not Divide.

For example, when I selected only three unfilled concentrically arranged square shapes with no other overlapping shape in the canvas & applied Divide, I got 5 shapes because the two inner squares were duplicated. I would expect in this case for the divide operation to have no effect.

I wouldn't expect Divide to have no effect in that scenario, but I think it should combine objects to leave you with three objects instead of five: the smallest square, the shape which you get when you subtract that square from the next larger one, and the shape which you get when you subtract that middle square from the largest one.

Alfred
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro

##### Share on other sites

I tried various sizes, and variations on the layer order. Lowest number count of curves after division was around 30. highest, somewhere over 80.

The most expedient method I came up with was to draw the nested squares, and the circle. Copy the circle. Select inner square, subtract. Paste circle, select next, subtract. Repeat. Took maybe a minute. Far less painful than trying to sort thru the arc fragments made by dividing.

iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

##### Share on other sites

Alfred, I expected it to have no effect because the 3 square rectangle objects were unfilled. However, starting with filled square rectangle objects of different colors, I still get 5 objects, each converted a to 4 node curve object. It is more obvious what is happening when I separate them out:

Instead of creating two curves (compound) objects for the larger two, it just duplicates the objects needed to create those curves (compound) objects.

gdenby, when I place the circle at the bottom of the layer stack, I get just 7 objects after the Divide action. Did you try that?

Edited by R C-R

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

##### Share on other sites

I tried various sizes, and variations on the layer order. Lowest number count of curves after division was around 30. highest, somewhere over 80.

The most expedient method I came up with was to draw the nested squares, and the circle. Copy the circle. Select inner square, subtract. Paste circle, select next, subtract. Repeat. Took maybe a minute. Far less painful than trying to sort thru the arc fragments made by dividing.

The way I see it, you don't need to sort through those arc fragments. You just need to delete them en masse so that you're left with the three shapes on the right.

Alfred
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro

##### Share on other sites

Instead of creating two curves (compound) objects for the larger two, it just duplicates the objects needed to create those curves (compound) objects.

Yes, that's why I said

I think it should combine objects to leave you with three objects instead of five

Alfred
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro

##### Share on other sites

gdenby, when I place the circle at the bottom of the layer stack, I get just 7 objects after the Divide action. Did you try that?

That 1 I didn't try.

iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

##### Share on other sites

Yup, Circle on the bottom, 7 curves.

iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

##### Share on other sites

Alfred, I was just trying to graphically demonstrate that what we think should happen is not what actually does happen.  :)

I'm still not convinced that the behavior should be the same for unfilled shapes as for filled ones, or if the expected behavior should create curves objects or compound ones, but I will leave that for the developers to sort out.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

##### Share on other sites

I'm still not convinced that the behavior should be the same for unfilled shapes as for filled ones

I'm still not convinced that unfilled shapes should be treated any differently than filled ones. :)

Alfred
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×

• #### Affinity

×
• Create New...