4

I've been doing things the slow way with this issue, but I am wondering (really hoping!) if there is a faster way. I'm using Adobe Illustrator.

Say I want to draw a line between two circles (behind the circles). Simple, create two layers, and voila:

enter image description here

Now, say I want to add an arrowhead on the line, that just touches the circle. Ok, I move the side of the line that I want the arrowhead on to the edge of the circle and put an arrowhead on it:

enter image description here

Now, someone tells me they want the circle moved. Hmm, all my work is now for nothing and I have to repeat the process, otherwise I get something wonky like this (line is no longer pointing to the center, arg!):

enter image description here

Question: Is there a way to offset the arrowhead, say 10px, from the end of the line so I don't have to move the line in the second step? Or is there a better way of going about this?

1
  • Look into using something like yEd. You can run it for free, it so does auto layout. And then shan done export as eps and read into illustrator. But yes what you ask can be done with the API, i have this function. But since i dont own the code i cant share. And since the copyright holder is nolonger around i dont know where to ask
    – joojaa
    Apr 7, 2016 at 6:51

2 Answers 2

3

I am not sure if what you're asking to do is possible in Illustrator. One work around is to group the path to the object and then rotate the group.

rotate the stroke with the object as a group

2
  • Nice, thanks! It's better than repeating the whole process. Ideally, I'd be moving multiple nodes with multiple lines, in a network setting. I really wish Illustrator would come up with an "offset arrowhead" feature!
    – Erik M
    Apr 6, 2016 at 22:24
  • @ErikM What you're looking for is a feature that would be found in a flow chart type program. Illustrator wasn't designed for something like this. Not sure what your end goal is but maybe using a flow chart program can be used in your workflow.
    – AndrewH
    Apr 6, 2016 at 22:52
0

You can achieve this as follows:

  1. Position however many circles you want (let's assume they're all the same size)
  2. Draw arrows between their centers
  3. Scale (uniformly) all the circles with respect to which you wish the arrows to have an offset (for example, all circles to which an arrow points) by 1 + desiredOffset / radius (e.g., if radius = 20px and desiredOffset = 10px, scale them by 1.5), with their respective centers as the anchor point (you may want to use Object > Transform > Transform Each). Make sure the circles are below the arrows (in terms of layers).
  4. Select the Scissors Tool (C) and click on the intersections of the scaled circles' outline and the arrows (with the help of smart guides)
  5. Undo step 3 (scale the circles by 1 / previousScale). Alternatively, you can duplicate all unscaled circles after step 2. and just delete the scaled versions after step 5.

image

PS: Be sure to deactivate View > Snap to Grid.

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.