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

path: Normalize paths #369

Merged
merged 2 commits into from
Jan 31, 2024
Merged

path: Normalize paths #369

merged 2 commits into from
Jan 31, 2024

Conversation

johannes-wolf
Copy link
Member

@johannes-wolf johannes-wolf commented Dec 4, 2023

Currently, non-connecting paths are drawn but can give wrong intersections results. Even tiny gaps due to rounding errors can lead intersections to fail. This function tries to clean up paths by merging multiple ("line", ..) segments and adding missing ones.

@johannes-wolf johannes-wolf linked an issue Dec 4, 2023 that may be closed by this pull request
@johannes-wolf johannes-wolf added the bug 🐛 Something isn't working label Dec 6, 2023
@johannes-wolf johannes-wolf modified the milestones: 0.2.1, 0.2.2, 0.2.0-bugs Jan 14, 2024
@johannes-wolf johannes-wolf self-assigned this Jan 17, 2024
src/path-util.typ Outdated Show resolved Hide resolved
src/path-util.typ Outdated Show resolved Hide resolved
src/path-util.typ Outdated Show resolved Hide resolved
@fenjalien
Copy link
Member

Oh and how could we go about adding a test for this? Or would it be covered by a merge path test?

@johannes-wolf
Copy link
Member Author

Oh and how could we go about adding a test for this? Or would it be covered by a merge path test?

Fixed. I've added a test case to the merge-path test.

@fenjalien fenjalien changed the base branch from 0.2.0 to master January 31, 2024 17:02
@johannes-wolf johannes-wolf merged commit 20a4413 into master Jan 31, 2024
2 checks passed
@johannes-wolf johannes-wolf deleted the path-normalize branch January 31, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Normalize paths
2 participants