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

How to join multiple lines together, joining the closest start/ends of lines together


Recommended Posts

Hi,

What is the typical workflow to join a bunch of lines you've drawn with the Pencil tool together to form 1 line?  (this is on Affinity Designer 2 on iPad)

The use case is I draw some hair on a character using the Pencil tool and have 30 curves created as separate vector layers.  I'd like to be able to select those 30 layers and combine them into 1 line, as if I drew the whole thing without lifting the pencil.

Here's what I tried that didn't work:

1.  Use the Add objects together Boolean button (all the lines just disappeared when I clicked the Add button)

2.  Select "Merge Selections" from the layers panel (nothing happened, i.e. nothing "merged", the lines were still separate layers and not connected)

3.  Click the Close Node button (this created all kinds of new crazy lines, as I think it connects line ends to line starts, which is not going to work for me because the lines are facing various directions).  I also tried overlapping a node with the nearest node so it turned yellow, THEN clicked Close Node, but that didn't work either (it still drew a long connecting line to some other node).

4.  Click the Join Node button (This didn't work.  I think the cause is some of the nodes have long handle bars on them, and thus when the application makes connections it make them crazy spiked - not a simple short line between two nodes like I need).

Basically what I'm looking for is if 2 nodes are a few pixels apart, join them together with the shortest distance possible (not some crazy long line across the page or some huge spike of a curve).  And I'd like to do this quickly if possible. If the answer is I have to correct all the handle bars of all the nodes one by one, that would take too long to be practical.

Thanks

Link to comment
Share on other sites

No 4 seems a bug to me.

filed a new bug report

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

1 hour ago, PitterPen said:

Here's what I tried that didn't work:

1.  Use the Add objects together Boolean button (all the lines just disappeared when I clicked the Add button)

2.  Select "Merge Selections" from the layers panel (nothing happened, i.e. nothing "merged", the lines were still separate layers and not connected)

3.  Click the Close Node button (this created all kinds of new crazy lines, as I think it connects line ends to line starts, which is not going to work for me because the lines are facing various directions).  I also tried overlapping a node with the nearest node so it turned yellow, THEN clicked Close Node, but that didn't work either (it still drew a long connecting line to some other node).

1 can only be used on closed curves.

2 works only pixel layers as bottom layer, and certain other layer types like pixel, adjustment, but not with vector shapes.

3 closes open curves individually, not what you want.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

24 minutes ago, NotMyFault said:

No 4 seems a bug to me.

filed a new bug report

 

I think it might be an iPad bug...I've attached a file that gets crazy spiked curves if you join the lines on my iPad (using the Join Curves button after selecting all with the Node tool).  I just tried the same thing on my desktop and it worked fine (the lines joined in small short lines).  Basically in the attached file are 3 lines, and I want to join them together into 1 line.  It looks fine on the desktop, but is a mess on the iPad.

 

how to join lines 4-13.afdesign

Link to comment
Share on other sites

  • Staff

Hi @PitterPen,

16 hours ago, PitterPen said:

I think it might be an iPad bug...I've attached a file that gets crazy spiked curves if you join the lines on my iPad

I can confirm this is a bug within Affinity Designer 2 iPad which I have logged with our development team to be resolved ASAP :)

Link to comment
Share on other sites

  • 8 months later...
  • 1 month later...

I just wanted to say I am having a similar issue.
I am drawing a map and have been zoomed into the image using the vector brush tool to draw the lines. I have to stop and start the line as I pan the camera over the image. Having drawn a lot of separate lines I now want to merge them into one line. I've used the tool most commonly used to merge shapes together and while it does merge the lines into one it also adds new straight lines as if it's trying to make each line into a loop. I've attached images.

Error01.jpg

Error02.jpg

Link to comment
Share on other sites

  • Staff

Hi @HalfDragoness,

Welcome to the Affinity Forums & sorry to see you're having trouble!

This certainly appears perhaps related to the above issue, however as the Curves are not creating nodes at the 0,0 point, there may be a different issue occurring with your file.

Therefore I'd like to request a copy of your Affinity document, before you attempt to join these curves together. Can you please attach a copy of this file here for me?

If you'd like a private upload link for this document, please don't hesitate to ask.

Many thanks in advance :)

Link to comment
Share on other sites

  • Staff

Many thanks for providing that for me!

I believe you've used the 'Close Curve' command, which will attempt to join all of these vector lines into a singular, closed vector object - which causes the results shown in your above screenshot.

Instead of using the 'Close Curve' command, I'd recommend using 'Merge Curves' from the Edit menu (...) along the top toolbar. This will combine all of the vector Curve objects into a singular vector Curveobject, which does not need to be closed and therefore this issue does not occur.

image.png

I hope this helps :) 

Link to comment
Share on other sites

  • 1 month later...

Hi there, I've used Affinity for years and it's always had this issue when joining lines. It cannot handle curves that join at places other than the two ends. It's frustrating to say the least that this program cannot join lines properly. I'm trying to draw a tree with the pencil tool and I want to attach each branch to the trunk but when I select both nodes on the tree it freaks out. Please, please fix this bug! The fact that I can do this better in powerpoint is ridiculous. Here is a video showing how inconsistent this is too.

Link to comment
Share on other sites

Hi and welcome to the forum. Not fully clear what you try to achieve.

Affinity cannot create Y joints between curves. A curve is always a chain of nodes, and every node connects to exactly 1 (edge nodes)  or 2 (inner nodes) other nodes, never to 3 nodes.

In simple cases you may run a Y as one curve by double-running one of the edges A-M-B-M-C ( Atop, M middle, B left lower, C right lower).

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

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

5 minutes ago, kiararey said:

Please, please fix this bug!

It isn’t a bug, it’s a limitation of the way Bézier curves work: each node is connected to no more than two other nodes, but to add a branch between two end nodes would require the connection point to be connected to three other nodes.

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

I can try to double run curves, but the issue is that when I export my work the space between disconnected nodes is visible, even when I am careful to align the nodes to the segments exactly (highlight the node, hover it over a line till it turns yellow, snap to objects on etc.). The other issue that is visible in the video above is that the edges of each line do not clearly align to the next line and that makes the edges protrude. I made the caps square to exaggerate this and make it clear but it is still visible when using any of the three cap options provided in the stroke window. A Y joint would be great actually so that doesn't happen. It that's not a bug I would love to have this as a feature

Edited by kiararey
Link to comment
Share on other sites

  • Staff

Hi @kiararey,
Welcome to Affinity Forums :)
If you use the rounded cap it should align the lines perfectly. Here's some tips that may help you (no sound). Note that before I start a new line in the three with the Pen Tool I press ESC to deselect the last node/line I've drawn otherwise it connects everything.
The tree on the left is just a bunch of separate lines that I've grouped in the end. The tree I've drawn on the right is still a bunch of separated lines but all placed in the same object layer thus they behave like a single object when selected - if you later select that tree then go to menu Layer > Geometry > Divide, it's then separated in all individual lines each one with its own layer.
   

 

Link to comment
Share on other sites

1 hour ago, kiararey said:

Hi there, I've used Affinity for years and it's always had this issue when joining lines. It cannot handle curves that join at places other than the two ends. It's frustrating to say the least that this program cannot join lines properly. I'm trying to draw a tree with the pencil tool and I want to attach each branch to the trunk but when I select both nodes on the tree it freaks out. Please, please fix this bug! The fact that I can do this better in powerpoint is ridiculous. Here is a video showing how inconsistent this is too.

I'm not sure of the end goal here other than joining the respective nodes and I appreciate that you've deliberately used square caps for demonstration purposes but based on your screen recording alone, would changing these to butt or round caps (depending on your preference), aligning the nodes and then merging the layers not achieve the same end goal where you have all your tree branches as a single layer?

Edit: @MEB beat me to it...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2430) | Affinity Photo Beta 2.5.0 (2430) | Affinity Publisher Beta 2.5.0 (2430)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

Hi all, thanks for the quick responses! I usually use round caps and fiddle around with lines to make sure one is not protruding, but it's a whole process. In case someone else has the same issue as me with even the round caps protruding from another segment what I usually do is basically what @Hangman said: I make a node on the main line I'm trying to align something to at the spot where I want the pseudo Y joint, then move the nodes together. If I still see some protruding I will select both segments, then highlight both nodes that I want to overlap with shift + select, then align them with the alignment tool.

My point is that this is still a lot of work and often when I align things that are pretty complex the program will snap the caps in weird places leading to things like what's shown in the video for example (I've noticed improvement in this with Affinity 2 however). I'm eventually able to fix it but I would love a button that does something similar to the join node button where it will align two nodes without necessarily making a new curve or without the nodes needing to be at either end of a line! The pen tool and the alignment tool are useful in these cases though. I will keep doing this process to align things.

For the weird end-to-end joining curve that was initially described here (the joining nodes at number 4) I have sometimes been able to fix this by reversing the curve direction - not sure why that helps sometimes but not others but if you encounter that bug and you're in a hurry give it a try

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.