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

Improve separating shapes by path - Polypath #5

Open
TobyKLight opened this issue Oct 3, 2022 · 0 comments
Open

Improve separating shapes by path - Polypath #5

TobyKLight opened this issue Oct 3, 2022 · 0 comments

Comments

@TobyKLight
Copy link
Owner

Goal

The goal of the end user is to split a shape into parts with only an open path. Like the knife tool in Adobe Illustrator.
Currently shapes can only be clipped by other shapes with fill.
The workaround (As used by the PolyPath.Compartments operation) is to clip the shape with a very thin filled shape representing a line. However this means the resulting points do not exactly match the original points and can create artifacts. You can see this in the helpatch "Extract Compartments from a Polypath" by changing the 'divider width' value.

Polypaths

PolyPaths use the Skia native SKPaths Op function to clip curves (and retain 'vector' curve data).
This function only supports clipping with fill area.

Potential solutions are:
-Clip using the 'small filled paths' workaround > Then have an operation that searches along the clipping path for an original point in the radius of all new points and shifts new points back to their original position. I can already see some edge cases that wouldn't work with this solution but maybe worthwhile.
-Find another clipping algorithm for this case? If anyone has ideas put em below. (Or even better if you'd like to contribute a patch more than welcome)

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

No branches or pull requests

1 participant