Jump to content
m.wieckowska

[Designer] Simplifying / closing single curve

Recommended Posts

Hello,
I'm currently preparing hand drawn icons for the web (svg) export.
I want to make a single element out of multiple layers to save some kbs, but after choosing "Add" option some of the parts are substracted.

Problem happens when I try to close / simplify a single curve (one object in the layer menu), that has some overlapped space.
I tried expanding the curve, then tried every single action in the Action centre based under Node Tool and still can't figure it out.

I'm used to just selecting "Add" (Illustrators path finder) to make it a single shape without overlapping paths, but in Designer there is only "Divide" that can be chosen.

Any tips and ideas will be appreciated :)

curves.jpg

Share this post


Link to post
Share on other sites

If I understand what you want correctly, try changing the Layer menu > Fill Mode setting:

59a6935599962_layerfillmode.png.01c105432d043041d87dd29856cc9c1c.png


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites

Thank you for taking your time!

I'm starting with Winding mode by default (first and third icon in screenshot), when I change it to Alternate then yes, fill mode changes and parts are substracted.

It doesn't work the other way around tho.
When I select all elements and then choose "Add" tool to merge them I get the second icon + fill mode changes to Alternate, but nothing happens when I'm switching to Winding.
I guess "Add" tool substract this common parts permanently.

How to prevent Designer from doing so?

Share this post


Link to post
Share on other sites

I am not sure I followed all of that but if you are trying to merge all the shapes into a single one with holes in it, you can't really do that. You should be able to use Add to create a "(Curves)" -- note the plural -- layer, but it still really will be composed of multiple shapes so if you export it to SVG format each shape will become separate.


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites

Hi m.wieckowska,
Welcome to Affinity Forums :)
Have you created these icons from scratch in Designer or did you started importing a file with some elements already? If you have imported a file can you please upload the original file using this link so i can take a look? Thanks.

Share this post


Link to post
Share on other sites

Hello MEB,
I've uploaded the file you've asked for and will be thankful for you feedback :)
It was created in Illustrator initially, then I switched to Affinity in the meantime.

R C-R
I've already managed to merge far more complex shapes with no problem at all - "Add" tool worked fine, without substracting anything. Designer created "Curves" layer, but with no nested contents - just one, merged shape (code also shows it as one path).

Also, there isn't really any holes in my icon to begin with. It's just a shape outcome from expanded brush work - thus there are overlapping areas.
First and third ones (above) are starting points, second is an "Add" tool result.

Share this post


Link to post
Share on other sites
2 hours ago, m.wieckowska said:

R C-R
I've already managed to merge far more complex shapes with no problem at all - "Add" tool worked fine, without substracting anything. Designer created "Curves" layer, but with no nested contents - just one, merged shape (code also shows it as one path).

I apologize for not being very clear about what I meant about the "Curves" layer really being composed of multiple shapes. I was called away while I was composing it & I posted too hastily what should have been a longer, better explained reply. I hope this will help make up for that:

59a6f4b0ced08_Curveslayerissue.png.ee9d7fed04f041bd3e9711279b7c4b7d.png

On the left are the two overlapping closed curves that I used to create the Curves layer shown to its right. Note the red circles around the red nodes indicating the node that closes each individual curve's path. During the Add operation Affinity actually created four closed curves from the two original ones. Applying a Divide operation to this Curves layer reveals that none of these curves overlap themselves so the Fill mode won't matter, & that the Add operation created holes in the outer shape by subtracting the smaller inner ones from it.

 

So I don't know if this should be considered a bug or something else, but either way it is something I hope will be improved in a future version.

Add Curves example.afdesign


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites

MEB wrote me a PM yesterday about this matter saying It's something to do with svg file code written in a specific way.
Not sure how to process that now, when .afdesign file works the same :) (didn't check that out before).

It would be great if user could choose overlapping curve, click "Add" and get a single merged shape.

For now we need to deal with workaround delivered by MEB (if there are other members needing the solution):
"A simple way to close the gaps is hitting the Divide button then drawing a rectangle over the gap ( see the attached clip - no sound), select both the rectangle and the shape and Add them (boolean operation). Then delete the nodes with the Node Tool until the gap disappears. Note the shortcuts on the bottom right of the recording to remove the control handles from the last node on the second shape (almost at the end of the clip) You have to press and hold ⌥ (option/alt) and click the node's handle to get rid of them. After closing the gaps of the two problematic shapes, i just selected all objects and clicked Add again to convert all to a single shape."

It's ok when there's one icon that needs such polishing... worse when you have to prepare several dozen of them... ;)

Share this post


Link to post
Share on other sites

Out of curiosity, can you apply MEB's workaround to the Add Curves example Affinity Designer file I attached to my last post?


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
2 minutes ago, m.wieckowska said:

Works perfectly fine :)

Would you mind posting a screenshot of the results?


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites

Thanks. I am having trouble understanding how this works. MEB's instructions imply there is only one shape & one rectangle ("select both the rectangle and the shape and Add them"), but after the divide operation, I have four shapes. I am not sure how many rectangles I need to draw over the gaps, or which shape to add a rectangle to. Every Add I do ends up leaving only the largest outer shape, usually with one or more extra nodes, depending on where I place the rectangle(s), or combining one of the inner shapes with the outline of the rectangle, which changes the shape enough that the two open areas shown in your screenshot are distorted & still don't eliminate any gap.

 

Any clues you can offer to set me on the right track?


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
26 minutes ago, A_B_C said:

Tricky … ^_^

Indeed it is, particularly when the divide operation produces several curves! After I (finally!) figured out which ones to add rectangles to & what they should overlap, I managed to get the same results as @m.wieckowska was kind enough to post for my example file. But then I realized it would have been somewhat simpler to use MEB's technique on my two closed overlapping curves before I added them together, one curve at a time, & only then add them together. That avoids the whole four curves thing.

 

Thinking about that, I wonder if a useful addition to the app would be a function that converted a closed curve that overlapped itself into a single Curves object in one step, automatically removing the overlap.


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
17 minutes ago, R C-R said:

Thinking about that, I wonder if a useful addition to the app would be a function that converted a closed curve that overlapped itself into a single Curves object in one step, automatically removing the overlap.

That would be great :)

My approach was:
1) selecting all items
2) merging them (add) which causes curves to divide
3) rectangles and nodes deleting

So, replacing Divide option with Add on the start, and then removing the gaps.

Share this post


Link to post
Share on other sites

What makes that approach so hard for me to use is that as the number of overlapping shapes & how many times any of them overlap themselves increases, after Adding them all together it becomes almost impossible for me to figure out which ones to pair with a rectangle for the remaining operations. It is much easier for me to work on the shapes one by one first, removing the gaps in each of them, & then doing a single Add to merge them all into a single Curves layer.

 

It is still labor intensive, just less strain on my brain. :S


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites

I am all for it. :D


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites

I've got a bit of a different method... (of course xD)

 

But first: Yeah, in Illustrator this is simply..... Add :|.

 

Anyway: I would break the curves in an innocuous place and then hit add.

With RCR's example basically three clicks.

If you want to close the curves after breaking (all in one shot), that's an extra click.

 

 

 

Share this post


Link to post
Share on other sites
17 minutes ago, JimmyJack said:

Anyway: I would break the curves in an innocuous place and then hit add.

With RCR's example basically three clicks.

Wow! Your video taught me something I probably never would have discovered on my own: while the Break Curve action will annoyingly only break one node on a shape when two or more nodes are selected, it will simultaneously break one node on each of two different selected shapes when each of them has a node selected. Sort of logical now that I think about it, but I never would have if not for your video. Thanks!!!

 

As for your method, it works great when it is easy to decide which are the innocuous places to make the breaks. When it is not, it can take a little trial & error to determine that, but it still isn't too bad ... unless there are more than two more complexly overlapping shapes & you want to avoid the bugs in the boolean actions that sometimes create extra nodes that are not needed.

 

I know it must be doable even then, but it can get so complicated it overloads my feeble old brain, for example with the attached file or variations of it: my nightmare.afdesign


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
7 minutes ago, R C-R said:

I know it must be doable even then, but it can get so complicated it overloads my feeble old brain, for example with the attached file or variations of it: my nightmare.afdesign

 

Nothing is going to be as easy as the way it SHOULD be. A simple add.

This is just part in parcel of the whole Boolean "situation" within Affinity O.o

 

That being said.... just trying to make the workaround world as easy as possible.

 

The nightmare file seems to be basically the same as the other example. Just hide one of the other shapes to get access to red's nodes, or, with all three showing add a couple points to the red (two more don't do any more harm in my mind). 

Of course, if there are 50 objects, then yeah, that's gonna be a huge pita. I wouldn't spend two seconds wrestling with Affinity if that were the case at hand.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×