Jump to content
You must now use your email address to sign in [click for more info] ×

Boolean Substraction doesn't work as expected


Recommended Posts

Hi, I'm super new to Affinity Designer and I am trying to subtract curves from the outer shape. I want to make the LINE letters transparent in the bubble icon.

However, when I select the letter curves and click subtract, only the letter N is behaving as I expect. The rest isn't subtracted. (This file I got from others so I don't know how they drew it)

What should I do? I can solve this by using the Alternate (even-odd) filling mode but the SVG JavaScript framework I'm using doesn't support even-odd so I'm stuck with Winding (non-zero). Also, it's weird that only letter N is working, the rest doesn't. It should behave in the same way, shouldn't it?

Thanks in advance!

Before:

212834308_Screenshot2021-09-13at21_14_14.thumb.png.96ab08393c2669794d8da432d05c8337.png

After subtraction:

Screenshot 2021-09-13 at 21.14.27.png

 

subtraction.afdesign

Edited by Thammarith
Link to comment
Share on other sites

On 9/3/2020 at 4:59 AM, wigglepixel said:

[edit] please read the last line of this post, which I think could be the solution to the issue

I just did some more testing and found out how to make it work without tricks in the file I'm working on.

In this file there are a few paths that work with subtract and others that don't (see previous post). So I tried reversing the paths of the 'non-subtracting' paths, and after that the subtract is working as expected.

So it looks like the issue of boolean subtract not (always) working has to do with the direction of the paths not being the same as the path to subtract from. (But ofcoarse this shouldn't be an issue and should always work, so this is more of a workaround than a solution)

Second video below (workaround 1): first paths without correction resulting in wrong subtract, then first reverse path directions of 'non-subtracting' paths before subtracting resulting in expected subtract. (btw, it would be nice if this forum would let us move videos around in a post)

Hope this helps the developers to fix the issue.

 

[edit] workaround 2: changing fill mode of all paths to alternate
I just found out that when changing ALL paths needed for the subtraction to 'Alternate (even-odd)' fill mode, subtraction works as expected, no matter the direction of the paths, but when switching to 'Winding (non-zero)' we get the subtraction issues back again.

In the video below all paths are in fill-mode 'Winding (non-zero)' first. And you see this is causing issues when subtracting. After that I change the mode to 'Alternate' and subtraction works fine. Changing it back to 'Winding' again and subtraction fails again.  So to me it seems like 'Winding (non-zero)' is throwing these issues with the boolean subtract operators.

And now I also understand why @anon2 's workaround works: convert to curves ALWAYS puts the created path/curve into 'Alternate (Even-Odd)' fill mode. And with that fill-mode there are no subtract issues. So the workaround in there is basically not the non-destructive subtract, neither the 'convert to curves', but the switch to 'Alternate' fill mode.

So my guess is that the issue would be fixed if subtract would automatically switch all selected paths to alternate mode first before subtracting.

 

 

 

workaround 1 (when in 'winding' mode): reversing direction of 'non-subtracting' paths before subtract:

 

I found the solution. Just reverse the direction of the curve. Solved!

Link to comment
Share on other sites

Welcome to the Serif Affinity Forums, @Thammarith. :)

11 minutes ago, Thammarith said:

I found the solution. Just reverse the direction of the curve. Solved!

I’m glad you managed to find a workable solution in this particular case, but in general if you have multiple curves that you want to subtract from another curve you can select those curves and add them to create a single ‘Curves’ object. Subtracting the new object from the outer shape should then give you the result you expected.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

22 hours ago, Alfred said:

Welcome to the Serif Affinity Forums, @Thammarith. :)

I’m glad you managed to find a workable solution in this particular case, but in general if you have multiple curves that you want to subtract from another curve you can select those curves and add them to create a single ‘Curves’ object. Subtracting the new object from the outer shape should then give you the result you expected.

Thanks for the suggestion. I tried what you suggested but it didn't work the way I expected :(

172313304_Screenshot2021-09-14at20_08_48.thumb.png.0cea8f034d8d5317de984ae9d27608c8.png

 

Screenshot 2021-09-14 at 20.08.53.png

Link to comment
Share on other sites

6 hours ago, Thammarith said:

Thanks for the suggestion. I tried what you suggested but it didn't work the way I expected :(

That's odd. It works fine for me, like in this Curves subtract.afdesign file. I included the history of the last few steps so you can use the History panel slider to see that it works.

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

Link to comment
Share on other sites

On 9/13/2021 at 5:36 PM, Thammarith said:

I found the solution. Just reverse the direction of the curve. Solved!

I found a second solution, which is a non-destructive boolean mode. Hold Alt before the boolean operation.

Link to comment
Share on other sites

34 minutes ago, PixelPest said:

What´s odd is that just "N" has the right path direction from the text. If you reverse L, I, E before Geometry add all will work as expected.

Hmmm. In my Curves subtract file, I divided the Curves layer, changed two of the curve's directions (so two each way), added them to get a Curves object again (still with two each way), & subtracted again. No difference for me -- it did not matter which way the curves went.

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

Link to comment
Share on other sites

17 minutes ago, R C-R said:

No difference for me -- it did not matter which way the curves went.

We are talking about the file the author provided.

Link to comment
Share on other sites

2 hours ago, telemax said:

We are talking about the file the author provided.

Understood. I just don't know why that makes a difference in that file but not in mine.

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

Link to comment
Share on other sites

5 hours ago, R C-R said:

Understood. I just don't know why that makes a difference in that file but not in mine.

Because you drew a new bubble.

If I draw a new shape in the author's file then I can subtract all the letters without a problem. It's when subtracting them from the bubble when suddenly the curve direction matters. Subtracting new shapes from the bubble work the same as the letters. one direction works, other direction doesn't.

The problem is in the bubble but I can't find it.

I pasted his bubble in your image and tried to subtract the text from that bubble, same issue. You need to reverse curve on the letters before being able to remove them.

  • Windows 10 Pro
  • Intel Core i7-4770 3.40Ghz
  • 16 GB RAM
  • Nvidia Geforce GTX 980
  • Samsung EVO 850 SSD
Link to comment
Share on other sites

20 minutes ago, Xzenor said:

The problem is in the bubble but I can't find it.

No it´s not the bubble - it´s the "N". What you seem to get with a new object and Geometry->Subtract (Geometry merge) is the fill-rule Even-odd which will open the "holes" but is cheating. When you look at the stroke orientation/direction you will instantly discover why it´s not working with fill-rule non-zero. Fill-Mode should not alter the appearance of compound paths.

Link to comment
Share on other sites

28 minutes ago, PixelPest said:

No it´s not the bubble - it´s the "N". What you seem to get with a new object and Geometry->Subtract (Geometry merge) is the fill-rule Even-odd which will open the "holes" but is cheating. When you look at the stroke orientation/direction you will instantly discover why it´s not working with fill-rule non-zero. Fill-Mode should not alter the appearance of compound paths.

Then add a new shape and subtract the letters from that. That goes without a problem. Even when you change the curve direction, no problem.

Yet when you try it with the bubble, suddenly the curve direction matters.

  • Windows 10 Pro
  • Intel Core i7-4770 3.40Ghz
  • 16 GB RAM
  • Nvidia Geforce GTX 980
  • Samsung EVO 850 SSD
Link to comment
Share on other sites

Quote

this is when Even-odd is enabled

I missed that part.

How would you enable/disable that and how can you see the current status?

I know you can make the direction visible but it didn't have any effect on new shapes I made, probably because it wasn't enabled on the new shape.

  • Windows 10 Pro
  • Intel Core i7-4770 3.40Ghz
  • 16 GB RAM
  • Nvidia Geforce GTX 980
  • Samsung EVO 850 SSD
Link to comment
Share on other sites

Quote

Try to enable non-zero and see how that goes. ;-) 

Changed my fresh new shape to "Winding (Non-zero)". No change.. all letters still subtract fine, even if I change the curve direction 🙄

I'm lost..... I'll jump in the helpfiles for some explanation of the differences..

  • Windows 10 Pro
  • Intel Core i7-4770 3.40Ghz
  • 16 GB RAM
  • Nvidia Geforce GTX 980
  • Samsung EVO 850 SSD
Link to comment
Share on other sites

4 hours ago, PixelPest said:

But my question remains why just one of the 4 glyphs wear the opposite direction of the path or why they are not all equal?

Just guessing but maybe the OP accidentally clicked the Reverse Curves button in the Context toolbar to change the direction of the N curve, & also at some point changed the fill mode to Winding (Non-zero)?

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

Link to comment
Share on other sites

21 minutes ago, R C-R said:

Just guessing but maybe the OP accidentally clicked the Reverse Curves button in the Context toolbar to change the direction of the N curve, & also at some point changed the fill mode to Winding (Non-zero)?

I took the SVG from FontAwesome (https://fontawesome.com/v5.15/icons/line?style=brands), then I removed the outer square and it behaves weirdly like this.

This also happens on Figma as well. I guess it's something to do with the direction.

Figma:


image.png.09739d1f1b97117689b040e0991fb82e.png

Link to comment
Share on other sites

1 hour ago, Thammarith said:

I took the SVG from FontAwesome (https://fontawesome.com/v5.15/icons/line?style=brands), then I removed the outer square and it behaves weirdly like this.

I downloaded the SVG file, opened it in AD on iPad, and performed the following steps:

1. Select the ‘Curves’ object

2. Divide shapes

3. Select the letter shapes

4. Add to create a new ‘Curves’ object

5. Subtract the letter curve from the speech balloon

6. Hide the rounded rectangle background shape

Result:

F59DA3FF-F052-4F87-B787-415BB3AB3628.jpeg.bdc543efe54e7854b336b30d698bfcdc.jpeg

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.