-
Notifications
You must be signed in to change notification settings - Fork 2
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
MergePaths causes warping when paths overlap #88
Comments
svgo had a similar bug: svg/svgo@e1060df |
https://computerwebsite.net/writing/gjk seems like a useful summary of the algorithm they use |
It just occurred to me that GJK isn't absolutely necessary. A good first step would be to use an axis-aligned bounding box check for intersection detection. svgo does this as an optimization but it's really all that's required to avoid this bug because it will over signal intersections. GJK would make the intersection detection more precise and result in more path merging, but it could be done in a follow up. |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Shrinking this vector drawable results in the image being hollowed out.
Expected behavior
The image to visually identical
Screenshots
![Screenshot 2024-09-30 at 3 54 48 PM](https://private-user-images.githubusercontent.com/5142575/372226678-18f49183-a68d-4a68-96a4-d4b84c33916c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjM4MTYsIm5iZiI6MTczODgyMzUxNiwicGF0aCI6Ii81MTQyNTc1LzM3MjIyNjY3OC0xOGY0OTE4My1hNjhkLTRhNjgtOTZhNC1kNGI4NGMzMzkxNmMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDZUMDYzMTU2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTYwMTkwODkwMDYxMWFjYzYxYmFjYTZiZjc2MTYwMzZiNjI2ZWNiMDNlMzI2MTUyMTUwZmIyNzNiMDIxZTQxZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.1s9_xng9ozJIYHdsqJl-ICSdtxloMrH8MtXAyIFUpRU)
The text was updated successfully, but these errors were encountered: