When joining paths in Illustrator, I get a straight line, even if I had vectors at the endpoints. Is there a way to join, preserving these vectors, so I don't have to figure out how to restore them when I actually want them?

i.e., going from this:


to this:


instead of this:

enter image description here

Any help would be appreciated, as this should be so easy.

4 Answers 4


Well you could build a script to do this quite easily. Lets do this:

#target illustrator

var doc = app.activeDocument;
var sel = doc.selection;

if (sel.length == 2){
    pathJoinClosest(sel[0], sel[1]);

function pathJoinClosest(path1, path2){
    var pts = path1.pathPoints;
    var pts2 = path2.pathPoints;

    var lastFirst = dd(pts[pts.length -1], pts2[0]);
    var lastLast = dd(pts[pts.length -1], pts2[pts2.length -1]);
    var firstFirst = dd(pts[0], pts2[0]);
    var FirstLast = dd(pts[0], pts2[pts2.length -1]);

    var min = Math.min(lastFirst,lastLast,firstFirst, FirstLast);
    switch(min) {
        case lastFirst:
        case lastLast:
        case firstFirst:
        case FirstLast:
    pathJoin(path1, path2);

function pathJoin(path1, path2){
    var pts = path1.pathPoints;
    var pts2 = path2.pathPoints;

    for (var i = 0; i < pts2.length; i++){
        pt = pts.add();

        pt.anchor = pts2[i].anchor;
        pt.leftDirection = pts2[i].leftDirection;
        pt.rightDirection = pts2[i].rightDirection;
        pt.pointType = pts2[i].pointType;

function pathReverse(path){
    var pts = path.pathPoints;
    var len = pts.length; 

    // Swap each pair
    for (var u = 0; u < len/2; u++ ) {
        var l = len - u - 1;

        var anchor = pts[l].anchor;
        var leftDirection = pts[l].leftDirection;
        var rightDirection = pts[l].rightDirection;
        var pointType = pts[l].pointType;

        pts[l].anchor = pts[u].anchor;
        pts[l].leftDirection = pts[u].rightDirection;
        pts[l].pointType = pts[u].pointType;
        pts[l].rightDirection = pts[u].leftDirection;

        pts[u].anchor = anchor;
        pts[u].leftDirection = rightDirection;
        pts[u].rightDirection = leftDirection;
        pts[u].pointType = pointType;


function dd(pt1, pt2){
    return Math.pow(pt1.anchor[0]-pt2.anchor[0], 2)+
           Math.pow(pt1.anchor[1]-pt2.anchor[1], 2);  

Well joining was easy, implementing closest point was not so succit. Implementing more than 2 paths and implementing selected control points and closed paths is just raw work so i stopped at join closest points of 2 paths.

Now if one could only make adobe treat scripting sanely so that one could bind that to a shortcut.


Probably not the answer you're looking for....

There's no automated way to join paths and continue bezier curves.

I handle situations like this by drawing a section to be joined. Then select the connection anchors on each path and use Object > Path > Average and Object > Path > Join at the same time via a little known or hidden shortcut.

Hidden shortcut to average AND join anchors in one step.

Holding Command/Ctrl+Option/Alt+Shift and tapping J will average (both vert and horiz) and join two anchors in one step.

So guestimate the connection path... average+join the end anchors and refine if necessary.

enter image description here

This still relies on you eyeballing things a bit, but it's often better than dealing with curves being entirely reset.


Only manually, you would have to click one of the end points then click the other one and drag without releasing the mouse button until it looks about right. Then use the A tool to further adjust the resulting curve.

The built-in 'Join' command only connects via a straight line.

  • I know it connects only with a straight line, and I typically do adjust it after, but it's not always exact, which is sometimes unacceptable in cases when you have two paths ontop of each other where they must align exactly.
    – Codesmith
    Commented Jul 6, 2017 at 21:41

I'm guessing you're using the pen tool, clicking one endpoint and then clicking the other.

Try clicking one endpoint, click and hold/drag the second endpoint.

Make the curve you want, then restore the corner join to rounded with this:

enter image description here

  • But that would move the original handles and alter the existing curves...
    – Luciano
    Commented Jul 7, 2017 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.