Jump to content
Herojas93

Still problems with Corners Expanding Stroke AD 1.6 B11

Recommended Posts

HI,

 

I'm still getting bad results at corners expanding strokes.

I'm running HIGH SIERRA 10.13

 

Here I attach the visualization and settings at AD software and also the obtained PDF file.

 

Thanks

PDF result.jpg

Stroke Corners Issue.png

Share this post


Link to post
Share on other sites

Hi!

 

The Mitre limit is basically the point at which the line will miter up to, and bevel if it is exceeded... When adding the outside edge of the stroke, if the tangents that form a corner would meet at a point which is 'miter limit' distance away or less from the on-curve point associated with that corner, then they are allowed to meet at that point, if the intersection point exceeds 'miter limit' distance from the on-curve point for the corner then the corner reverts to a bevel join type.

 

I've no idea if that makes sense to anyone else, but it does to me! ;)

 

Thanks,

Matt

Share this post


Link to post
Share on other sites

It does make sense, Matt, but maybe a little drawing will help in this instance … :)

  • Suppose you add a stroke to a rectangle shape, centered around the rectangle path, just as you did in your drawing. 
  • Furthermore, imagine a circle drawn around a corner point A of that rectangle, such that the diameter of that circle equals the width of the stroke applied to the rectangle. Then the radius of that circle will stand in a ratio of 1 : 1 to one half of the stroke width. See the purple lines in my illustration.
  • Now, when you set the mitre value of your stroke to 1, your stroke will be cropped by a tangent to the circle that is perpendicular to the diagonal from the corner point A to the corresponding corner point of the stroke. The purple non-dashed line of my illustration is part of that diagonal, and the radius of the circle is the geometrical equivalent of the mitre value in our case.
  • And it is basically the same, when you apply a stroke to a non-rectangular polygon. See my second illustration.

So when you increase the mitre value, you are basically increasing the radius of the circle. And when the ratio of the radius to one half of the stroke width becomes greater than 1.41 : 1 (which is the approximate ratio of the diagonal of a square to the side of that square), your stroke won’t be cropped anymore. Now, since the rectangles in your drawing are so small, you will have to go a bit further than the ratio of 1.41 : 1 in order to compensate for rounding errors, I guess … :/

Hope that is not only technically correct, but also makes sense … :)

Alex

Mitre.png.6ffc078703ac85b491e648336c9f278a.png

Mitre-Sharp-Angle.png.64d220e801121c7e84d0229bff2a89d9.png

 

 

Share this post


Link to post
Share on other sites

Ok I see. 

It have sense and I understand the working.

 

The problem for me is that the join “Mitre” changes it behavior by itself regarding the zoom in or out at screen. Without touch anything else or valor at mitre field. 

And the most funny thing is that the exported PDF have those changes on it. 

 

Could be be a bug?

Share this post


Link to post
Share on other sites

I see, but would you try the following?

  • Select all of your rectangles.
  • Set Mitre to 1.5.

Then have a look if it makes a difference. In your video, it seems as if your rectangles still had a mitre value of 1.414, but I could be mistaken. Hmm. :)

Share this post


Link to post
Share on other sites

It works perfect after set Mitre as 1.5.

I left it as default.

 

What is the valor that I have to consider for future? Regards the size of the stroke?

I don't know why it changes due the zoom.

 

Anyway many thanks for your help. I have to export 246 pages of manual and it was giving me headaches. ;)

Share this post


Link to post
Share on other sites

The mitre value you will need depends on the shape of your object. For rectangles, you will need a value that is at least the ratio of the diagonal mentioned in my description above to half the stroke width, regarded as unit length. Since the length of this diagonal, expressed as a multiple of half the stroke width, is an irrational number, it cannot be represented exactly. So you will have to use an approximation that is greater than this irrational number. To give the algorithms a little headroom, I would suggest using at least 1.5 as your value.

But as I said, the necessary mitre value depends on the shape. Have a look at my illustration below. Affinity Designer document attached. :)

Mitre-Comparison.thumb.png.6c6ae6e4e16dca0c8a9749f5bae9bb04.png

Mitre-Comparison.afdesign

 

Share this post


Link to post
Share on other sites

Massive round of applause to A_B_C for a great explanation of Mitre limit!!! :D

 

I do think that if you're getting instability with certain mitre values and levels of zoom, then I probably have a rounding error somewhere - at least it sounds that way, but I've not experienced it myself... I can try to look into this :) To give you an idea of normal defaults, I think PDF and SVG default to '10' but I could be wrong (it's early and I'm tired - and I've not had a coffee yet, so everything I say could be a dream at this point, haha!)

Share this post


Link to post
Share on other sites

Yes. 

Very good explaining even with a hard concept. 

 

Now I have clear the concept.

I believe I have left all my design as factory. Jeje

 

Thanks so much guys.  

Share this post


Link to post
Share on other sites

To further supplement @A_B_C’s excellent answer(s), if you want the bevel to activate at exactly 90° (or less), you need to set the Mitre to exactly the square root of 2, which is approximately 1.4142135624. If you enter ‘sqrt(2)’, Affinity will calculate the square root of 2 for you, but only to 3 decimal places, which means it rounds down to 1.414. At that value, the Bevel actually kicks in at 90°—squares get Bevel corners. If you want the Bevel to kick only when the inside angle is less than 90°, just bump 1.414 up to 1.415. Now anything less than square gets a Bevel.

 

Of course, this is only if you want the strict result of Bevel for angles less than 90°. The default value of 1.5 means Bevel will kick in when the angle is less than about 84°.

 

Finally, if you want no Bevel, which is why I came here, you just have to set a Mitre that you know will never be exceeded. Try the dimensions of your canvas, at least than it won’t matter if there is a Bevel.

 

Feature Request? Option to turn Bevel off completely.

 

With this feature, I don’t have to think about entering a big enough Mitre, I just click a button and I get sharp corners guaranteed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×