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

fix(polygon): Respect tolerance when removing colinear vertices #425

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

chriswmackey
Copy link
Member

It seems that the function to remove colinear vertices was too aggressive in some cases and was not aggressive enough in other cases. This is because the criteria to evaluate whether a given vertex is colinear did not account for the distance between the neighboring vertices.

Now, a colinear vertex will only be removed if the distance between it and the line drawn between the two neighboring vertices is less than the tolerance.

It seems that the function to remove colinear vertices was too aggressive in some cases and was not aggressive enough in other cases. This is because the criteria to evaluate whether a given vertex is colinear did not account for the distance between the neighboring vertices.

Now, a colinear vertex will only be removed if the distance between it and the line drawn between the two neighboring vertices is less than the tolerance.
@chriswmackey chriswmackey added the bug Something isn't working label Oct 29, 2024
@chriswmackey chriswmackey self-assigned this Oct 29, 2024
@chriswmackey chriswmackey merged commit dfcaffa into ladybug-tools:master Oct 29, 2024
9 checks passed
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.

1 participant