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
added improved flattening method for paths #618
Conversation
This certainly makes sense. I'd probably add it through an option parameter to the original method. But could you provide an example of a path where that angle mess up happens? |
There are plenty of scenarios where the current behavior is what you want, as a simple way to iterate at regular intervals over any type of path, e.g. to apply an effect to it. But I can see the need to offer the option to do this. I'll add it through the mentioned |
My recommendation would be to change the function as shown here and move the functionality you want into a new function called something like quantize, rasterize or equidistantSplit |
That will break backwards compatibility and is hence to be avoided. Also, |
Also, your implementation doesn't actually use I have a pretty clear idea how to extend the method, so I don't need further work on this PR. |
If we are going to change names, then I think what really deserves the name |
Another implementation we might want to look into is C#'s |
@BrownBear2 I was wrong about |
This flattening method will only flatten non-linear path segments.
This prevents 90 degree angles between linear segments being messed up.