• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help needed: how to add circles (eg) to each corner of a path?

Explorer ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Hi!

 

I would like to add circles (eg) to each corner of a path.

I can make it easily if I break my path into separate segments and use arrowheads, but I would prefer to keep it one single path.

I have tried using a pattern brush, but the shapes are deformed, some of the corners don't show if the angle isn't sharp enough.
(I have also tried with a dotted line, rounded path ends and 0mm dash and long gap eg but it doesn't work if my segments are different lengths).

 

Any idea? Thanks in advance!

TOPICS
Draw and design , Tools

Views

2.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

You could try this, the circles are separate from the path, but can easily be moved together with the corner when selected with the direct selection tool.

Select your path and choose: Object > Direction Handles.

Cut the selection.

Choose: Effect > Convert to Shape > Ellipse

Edit > Paste in Back and Object > Path > Join.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Hi Ton, thanks for your reply, but I already have several workarounds.
I'm looking for a solution where the circles are part of the path, as I'm creating many paths and have to move the anchor points often.
Maybe it's not possible, but maybe there's a way I don't know yet about. 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

It is easy to move the anchor points and the circles if you select them both with the direct selection tool.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Yes yes, I know. Just wishing for a more direct tool.
Thanks for your input though!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Do the circles need to be part of the path (as would be the case with a brush) or would you also accept it if they were separate objects?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Hi Monika, thanks for your reply.

Yes, I'm looking for a solution where the circles are part of the path, as I'm creating many paths and have to move the anchor points often.
Maybe it's not possible, but maybe there's a way I don't know yet about. 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

It doesn't help you immediately, but you could support the feature request I made some weeks ago: https://illustrator.uservoice.com/forums/333657-illustrator-desktop-feature-requests/suggestions/452...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Thanks, I just did!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

This is probably easily done with a script - I say probably because I'm not a scripter - but you will have to keep invoking the script, or wait 'til you've completed your path then run it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Here is a sample Illustrator file that uses a pattern brush.

 

Circle Pattern Brush 1

 

You will still have the issue with the obtuse angles (see green path), but at least the circles will not get distorted.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Thanks Kurt,
That's really close to what I'm trying to achieve!

Any idea on how to solve the obtuse angles?
Any setting or preference maybe?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Unfortunately, at the moment there is no instant setting or preference to prevent the obtuse (and acute) angles issue.

 

So, basically, you will have to add some circles manually from time to time. I'd have to think about more sophisticated workarounds.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Not a solution but a clunky work around: draw your line, apply the circle arrowheads, with the direct selection tool select every other line segment, cut, then paste in place.

There's an Align box under the arrowhead section of the stroke pallet, which will change where your line starts. (I used the first one and the circles perfectly overlapped - if you are concerned about them not overlapping just have the circle arrowhead turned on on one end (except for the first (or last) line segment where you'll need both) - the problem with this is you really have to pay attention to the stacking order so that the "tail" of the previous line segment is under the circle.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Hi Met, thanks for your reply. That's exactly what I did in the second drawing. I'm looking for a more dynamic solution, though.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Met,

 

as far as I can see, Crooty already stated in his initial post that he knows workarounds that split the paths into separate segments. At the same time he said that he would prefer something more compact.

 

Therefore I provided the pattern brush approach with circular tiles that do not get distorted (which usually happens if one creates tiles out of normally drawn circles). The downer at the moment is that it doesn't work well with some obtuse and acute angles. Nonetheless, it will work in many cases, though some manual work will be required.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

It is possible that I misunderstood the question, but if the intent is to add a circle at each anchor point, then this is trivially simple with a script.  Select a path and run the script.  The diameter and stroke weight of the circles can be changed by changing the values in the first two lines. 

// select path
var diameter = 10;
var strokeWidth = 1;
var points = app.selection[0].pathPoints;
var items = app.activeDocument.pathItems;
for (var i = 0; i < points.length; i++) {
    var top = points[i].anchor[1] + diameter/2;
    var left = points[i].anchor[0] - diameter/2;
    var circle = items.ellipse(top, left, diameter, diameter);
    circle.strokeWidth = strokeWidth;
    circle.selected = true;
}
app.executeMenuCommand("group");

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Hi Femke, thanks for your reply. As Kurt says, I'm looking for a dynamic solution, like a style or an effect that can be applied to my strokes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

Femke,

 

basically you understood the task pretty well and there are already a couple of scripts out there that do similar things. As does the the approach Ton provided.

 

But if you carefully reread Crooty's request, it is pretty obvious that he is not looking for a rather one-shot static solution. As far as I understand, some kind of compact dynamic objects are desired, such that you can for example just continue the zig zag paths or add and move some more anchor points while the circles will automatically be added. The scripting route cannot do that. The pattern brush can do it (with some limitations I mentioned above).

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

BTW, I'm a she. 😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2022 Jul 06, 2022

Copy link to clipboard

Copied

Hi Kurt,

well, the scripting route could add circles to every path point as well.

But as you said, this is not dynamic.

 

FWIW: Once I tried something like that with InDesign.

Made the script dynamic by adding event handlers with an "Idle Task". Something, I think, one cannot do with Adobe Illustrator. At least not with ExtendScript. My script for InDesign was not very fast, that's the main thing I disliked and needed always an idle moment so that the process could follow up the path points, their new positions and possible new or removed path points that had to be calculated.

 

Regards,
Uwe Laubender
( Adobe Community Professional )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2022 Jul 06, 2022

Copy link to clipboard

Copied

A handful of ointment for the aggrieved obtuse and acute angles.

 

Circle Pattern Brush 2 (styles)

 

Note: The workarounds may work in many cases, but they may also (partially) fail. You may just want to play a bit with them.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Hi Kurt…

Nice but sadly, still no cigar, eh?

 

Thanks a lot for searching, all the same!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Well, if you compare the "wrong" and "right" graphic styles in my second sample file, I'd say it deserves at least a cigarillo! |-)

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Here's a "good try" sticker.
try.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines