Skip to content
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

convertPathData reduce move commands #1272

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

omdathetkan
Copy link

Add optimization option to convertPathData that tries to minimize Move operations by sorting line elements to be adjecent. Particularly useful for optimizing SVG exports from some CAD data to be used by CNC software.

It's a bit of an edge case end not tested for all path commands, so disabled by default.

Before-After.zip

@omdathetkan
Copy link
Author

Could anyone take a look at this? Would be nice if it can be merged.

@TrySound
Copy link
Member

HI! Test cases would help to understand the feature and prevent from breaking later. Could you please add some?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants