In my earlier post about drawing a transit map, I made mention of the fact that Adobe Illustrator’s “Round Corners” effect doesn’t work very well with multiple curves around a corner, such as parallel route lines changing direction together on a transit map.
This part of my post elicited a very interesting comment from Chris Helenius in Finland, complete with a nice screen shot of the point he’s trying to make – that there are ways to get matching curves around a corner when using the Round Corners effect. However, the method he shows is a workaround – he expands the appearance of the curve, then offsets the path the required distance. In practice, this is very similar to my approach of keeping a “master” library of curves that I insert where needed – both require some cutting and pasting of points and curves to achieve the final result.
What Chris’ post doesn’t recognise is that Adobe’s implementation of Rounded Corners is fundamentally flawed, and it’s a flaw that makes it impossible to achieve consistent nested curves.
As the diagram above shows, the problem comes from Adobe’s poorly implemented definition of “radius” in the Rounded Corner effect’s dialog box.
The dictionary definition of radius is, “a straight line from the centre to the circumference of a circle or sphere.” And that’s what I expect to be implemented when I set a value in the dialog box – make a curve with this radius from the centre point of the inferred circle. If this were true, you’d see curves like those shown in the second column of the diagram: three nicely nested curves at a radius of 10, 20 and 30 points, which look the same regardless of the angle between the lines when you started.
Instead, you get what happens in column three. For reasons known only to itself, Illustrator measures the value that is put into the dialog box from the original corner point (shown as the black lines in column three) that joins the line segments on the intended curve, not the centre point of the circle. In other words, this is not a true radius at all.
When the angle between the line segments is 90 degrees, things work as expected, because the mathematics works out the same regardless of where the “radius” is measured from. But look what happens when there’s a 135-degree angle. Instead of the outer curve having a radius to its centre point of 30 points (as input into the dialog box), it’s actually 72.46 points! Even worse, all three curves end up having completely different centre points (as indicated by the grey intersecting lines), so no amount of fiddling with values is ever going to get them to nest inside each other properly.
As you can see, entering the same set of values into the Round Corners dialog box produces vastly different results depending upon the angle between the line segments – this makes results impossible to predict and the effect totally useless when designing a transit map: what is a nice tight 30 point radius on one part of the map may become a loose 72 point radius in another, even though you asked for a 30 point radius both times. I’ll be sticking to my labour-intensive, but 100% accurate methods.
Note: this part of the tutorial is no longer true for users of Adobe Illustrator CC and above, as Adobe has integrated the excellent “Live Corners” tool into the program. See this post on the Transit Maps blog for more information.