Closed Qrrbrbirlbel closed 1 year ago
It turns out you only found a special case of a more general problem, which I have not fully fixed yet. I will open another issue for that.
The underlying reason was a lack of special treatment for \pgfpathclose
if the final segment has length zero. Your first example came out correct by chance - the tangent of a zero-length line segment defaults to (1,0)
, which happens to be the tangent of the last segment in the first example but not in the others.
Thanks for reporting!
In the following document each row should show the same diagram.
The left ones are constructed clockwise, the second one is constructed counterclockwise. Both a positive or a negative offset work or fail. This only happens when the path has rounded corners and is closed.
Further tests show that even clockwise rounded closed paths fail, in this case even more catastrophic than the counterclockwise ones.
For fully rounded paths, the work around would be to use
rounded corners
with the offset path but even that won't work in some cases. I guess those are all some of those edge cases mentioned in the known issue.