-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
offset
seems to treat straight & curved segments differently
#78
Comments
Hello @mbutterick Thank you once again for the level of detail you've gone into opening this issue. I believe that what's going on here is that |
Instead of using a linear average of the Here’s how that looks using the original test cases, still applying All curvesIn this case, no change. Just like before, each on-curve point is shifted in the offset direction by 10 units. All straightsPreviously, with linear averaging, the points were only moving a net 5 units from their original positions. But with projection, they all move 10 points. Mix of curves and straightsPreviously, with linear averaging, the straight segments were moving only half the distance, but curve points were moving the full distance, resulting in top and bottom edges that were no longer horizontal. With projection, however, every point moves the correct distance, and parallelism is preserved: |
…paths contiguous (fixes hfutrell#78)
PR #98 shows how I did this, though it is not offered as a fully tested work of art. |
All curves
Here’s an example of a capital O showing what happens when
offset(10)
is applied: each on-curve point is shifted in the offset direction by 10 units.All straights
Here’s an example of the same
offset(10)
applied to a capital H. In this case, the points are only moving 5 units from their original positions:Mix of curves and straights
Now here’s a capital D with
offset(10)
. Whereas the O was only made of curves, and the H only made of straights, this combines both. The result is that the straight segments are moving only half the distance, so certain segments that should be parallel are not. For instance, the top and bottom edges are no longer horizontal.The text was updated successfully, but these errors were encountered: