Herojas93 Posted September 28, 2017 Share Posted September 28, 2017 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 predick 1 Link to comment Share on other sites More sharing options...
Herojas93 Posted October 12, 2017 Author Share Posted October 12, 2017 I'm having same issue with corners. It is not only a view issue, the exported PDF still have the same bugs. Link to comment Share on other sites More sharing options...
A_B_C Posted October 12, 2017 Share Posted October 12, 2017 Try setting Mitre to 1.5 and see if it goes away. Link to comment Share on other sites More sharing options...
Herojas93 Posted October 12, 2017 Author Share Posted October 12, 2017 Ok I will. Can an you clarify me how the Mitre adjust works? I’d like to understand this. Thanks Link to comment Share on other sites More sharing options...
Staff MattP Posted October 12, 2017 Staff Share Posted October 12, 2017 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 A_B_C and NotMyFault 2 Link to comment Share on other sites More sharing options...
A_B_C Posted October 12, 2017 Share Posted October 12, 2017 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 MattP, BertD, predick and 3 others 6 Link to comment Share on other sites More sharing options...
Herojas93 Posted October 12, 2017 Author Share Posted October 12, 2017 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? Link to comment Share on other sites More sharing options...
A_B_C Posted October 12, 2017 Share Posted October 12, 2017 I would believe that rounding errors play a certain role, but other than that, I fear only Matt can tell if that is a bug. Link to comment Share on other sites More sharing options...
Herojas93 Posted October 12, 2017 Author Share Posted October 12, 2017 I don't know but every refresh on the screen changes the corners behavior. Doesn't care the selection at stroke. See the attached video. Corners Issue.mov Link to comment Share on other sites More sharing options...
A_B_C Posted October 12, 2017 Share Posted October 12, 2017 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. Link to comment Share on other sites More sharing options...
Herojas93 Posted October 12, 2017 Author Share Posted October 12, 2017 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. Link to comment Share on other sites More sharing options...
A_B_C Posted October 13, 2017 Share Posted October 13, 2017 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.afdesign Sean P, garrettm30, NotMyFault and 1 other 4 Link to comment Share on other sites More sharing options...
Staff MattP Posted October 13, 2017 Staff Share Posted October 13, 2017 Massive round of applause to A_B_C for a great explanation of Mitre limit!!! 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!) A_B_C and predick 2 Link to comment Share on other sites More sharing options...
A_B_C Posted October 13, 2017 Share Posted October 13, 2017 Thank you, Matt! (I must confess, I couldn’t reproduce the behavior in the video myself, even with very small objects.) Link to comment Share on other sites More sharing options...
Herojas93 Posted October 13, 2017 Author Share Posted October 13, 2017 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. A_B_C 1 Link to comment Share on other sites More sharing options...
lukejanicke Posted February 27, 2018 Share Posted February 27, 2018 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. A_B_C and Pšenda 2 Link to comment Share on other sites More sharing options...
B064RT Posted April 26, 2021 Share Posted April 26, 2021 On 10/13/2017 at 2:21 PM, A_B_C said: 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.afdesign 24.11 kB · 5 downloads thanks for the post! Link to comment Share on other sites More sharing options...
Recommended Posts