Merge anchor points
I'd like an option to merge two anchor points into one on a shape/path. This would make cleaner paths and objects.
-
Thorne, I had no troubles by making the result I think you wanted... see GIF 1.
But the images you show are most probably done with some other approach. What did you do to get the result in image 2?...oh, I see. Most probably you used Shape Builder tool, correct? ...see GIF 2.
Here the result would be two identical shapes layered on top of each other (it makes sense once you analyze how it works, but doesn’t from the goal you have, I know).
This still does not explain the strange garbage points you got... that’s why I asked for a video. -
Thorne Brandt commented
@Egor Chistyakov
Sure. I'm trying to get a rounded trapezoid shape that will match a radial pattern. I thought I could accomplish this by creating two circles, placing two lines across them, joining and then cutting out the extra lines. What results is a hot mess of many overlaying anchorpoints.
-
@Thorne, can you please share the test file with the object you are having problem with and a video depicting the problem?
-
Thorne Brandt commented
I use the shape tool to combine some shapes and delete stray paths. I then like to go into them and round them out. Usually half of the anchor points are missing the rounding tool circle. I will try to select an individual anchor point and try to delete it, but sometimes it will seem like a clown car of infinite anchor points that I am pulling out of the same anchor point. Join/Simplify/Cleanup don't seem to have any effect. This wastes a lot of time and I really wish "cleanup" would dissolve/merge the points into each other. Not sure what cleanup is doing if not th is.
-
Joseph Sorensen commented
It's amazing there is no built-in solution to this. Added my upvote... this would be a game changer for Illustrator. Please Adobe, I beg you to consider this.
-
David commented
Since I cannot edit the post: IMG 1 is the one with the emoji, IMG 2 is the one with the star
-
David commented
Repost from here: https://community.adobe.com/t5/illustrator-discussions/remove-overlapping-anchor-points-remove-doubles/m-p/13648873#M359691
-
I oftentimes round corners or merge shapes together only to end up with a shape that looks nice but has horrible topology with overlapping anchor points. This makes adjusting bezier curves on these points impossible since the bezier handles are split up.
[IMG 1]
Blender 3D's solution is called "merge points by distance" or "remove doubles" which is used to reduce the vertex count which makes it easier to manipulate a model.
Let's say we have a 5-spoked star in Ilustrator and for some reason end up moving 4 anchor points of the right half on top of the anchor point at the top. You now have a nice half star silhouette with terrible topology since it icludes a corner with 5 overlapping anchor points. A simple "remove doubles" command would merge every anchor point on the canvas or selection that is closer than 0.000001 px or something like that, leaving you with the half star and no more overlapping points.
[IMG 2]
Yes, I know that you can just delete the 4 anchor points to get clean topology for the star, or put a rectangle over it and use the shape builder tool, but what do you do when you have a complex design with hundreds of curves that need to be merged and worked on afterwards?
The current workarounds are all terrible. Pathfinder doesn't remove anchor point duplicates and slightly alters the shape by 0.X pixels which ends up messing with alignments. Simplify Path redraws a new path which alters the shape and gives you no control over the anchor points and curves. Offset Path also alters the shape, either shrinking or enlarging it. CTRL+J only connects lose anchor points into a unified path, so it's not doing anything to help in this case.
https://www.youtube.com/watch?v=xCcV99wa07U
Blender 3D had this feature for a long time and it's really frustrating to not see it in a 2D vector application like Illustrator. On top of that, removing doubles should also carry both halves of the bezier handles over to the newly merged anchor point.
-
@Ben, this is the limitation of the method the team used to implement round corners. Ai has to keep the minimal distance between these two points to let it see both arcs as separate entities.
You can check this yourself (or look at the GIF I attached) — If there is only one anchor point instead of two, Ai sees it as one corner only, made for a very specific curve.
Sure, this method should be revised, and I strongly suggest making it a separate request, instead of just a comment under the mostly unrelated one. Please do!
Meanwhile you can use a commercial plugin to work with these, Dynamic Corners by Astute Graphics. As far as I know, they use a different principle to detect corners, and the endpoints get really merged into one automatically. -
Ben Dunkle commented
I have this problem when I max out the corner radius on a rectangle using corner widgets. The two overlapping points cannot be merged using any of the suggestions below. See attached for a clearer explanation:
-
Cam’s solution will work for a single path only.
If your object has several gaps and not one, this Unite will close each path, instead of connecting gaps. And you don’t need to select points for that, just select the path as a whole and hit Unite.Object > Path > Join connects the closest gaps, with a straight segments, first all of them but the largest, and close the path with the second operation. It has it uses, can be applied to a path selection too, but also to a pair on points — only one pair, and only a valid pair.
A less known Average and Join commands welds two selected points.Join tool would be another option to close gaps, with a sharp intersection of two curved or straight segments (it depends on a possibility). Unfortunately this tool can’t be automated, lacks proper feedback, options, and is very specific.
Another solution would be to use a paid plugin from AstuteGraphics suite, Connect tool. It build a new smooth segment between. The feedback is excellent, there are some options, results are almost better than stock Join, but it also can’t be automated and assigned to a hotkey.
I assume there is a mix of different 'merge', 'join', 'unite', 'connect', 'weld', etc. terms happened. The original topic started never explained exactly what they wanted, and everybody else talked about different things.
Perhaps we never know what was the original request :)
-
Zigmas Mallol commented
Yeah, Cam answer is the simplest, easiest way to do this. Just grab the two single points you want with the direct selection tool, and go to the pathfinder tool and unite them both.
the path Object>Path>"Clean up..." command also works well in certain cases.
-
Mo'men Khalaf commented
It will be good if we can remove duplicated pathes or points like in (Astute Graphic Suite)
-
epp commented
Thanks, Cam that's the answer.
-
Ivan Sablaev (Sahba) commented
Command+Option+J will AVERAGE 2 or more points BUT it will NOT join/weld them so you end up with 2 or more points sitting on TOP of each other. (CTL+ALT+J) Also, it needs a confirmation and will do this on Horizontal axis, or Vertical axis or both. However, if you are trying to join 2 points opposite of each other on a shape, e.g. creating a centerline on a banana, you have to do this manually for each of two opposite points, then take the start and end of the curve and cut them and delete ONE of the centerline curves.
It baffles me what is the exact use of having 2 points or more on top of each other short of possible screwing up a rip engine processing a file during print or worse CAD CNC. However, it does not surprise me as our Adobe sw techs in India seem NOT to have much clue about real world production of graphics and just very creative adding razzle dazzle rubbish to an already too top heavy 30+ year software.
-
Cam commented
use the selection tool to select the two anchor points
use unite in the pathfinder tool -
ML commented
Ctrl + Alt + Shift + J does nothing. This should be a thing, take two anchor points that are on the same path and adjacent to one another and then there should be a command which will average the distance and place a smooth anchor point at the average between the two points it's deleting and maintain the curve. Cmon adobe you can do it, I know you can!
-
Rahul commented
There is one more option that can help.
Select 2 anchor points using direct selection tool . Press keyboard shortcut Ctrl + Alt + Shift + J . It will join 2 anchor points .Instead if you like to join anchor points by creating path between anchor points , then Ctrl + J or Object > Path > Join would help
-
nate commented
This could be useful implemented as a modifier when dragging points.
For example, hold [ctrl/alt] when dragging one point on to another to merge them.[Object/Path/Join] is good but can be inefficient and sometimes ineffective due to its use conditions. Would be great if this could be a more interactive and absolute process.
-
Herman van Boeijen commented
Does Menu item
Object > Path > Join
not do this for you?Or would you need something like http://shspage.com/aijs/en/#join_reasonably ?
-
Shivendra Agarwal commented
Also you can simplify you path by:
http://vectorboom.com/load/tips/techniques/some_ways_to_simplify_path_or_reduce_extra_points_in_illustrator/16-1-0-452