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

Geometry_Engine: Collinearity check is not precise enough #3285

Closed
pawelbaran opened this issue Feb 15, 2024 · 2 comments · Fixed by #3283
Closed

Geometry_Engine: Collinearity check is not precise enough #3285

pawelbaran opened this issue Feb 15, 2024 · 2 comments · Fixed by #3283
Assignees
Labels
type:bug Error or unexpected behaviour

Comments

@pawelbaran
Copy link
Member

Description:

Query.IsCollinear(List<Point>, double) is currently a numerical check rather than geometrical - we create a matrix based on point coordinates and check whether it has enough zero rows. Transformation of geometrical tolerance to numerical is virtually impossible, therefore in edge cases points that should be considered collinear within tolerance, are returned as not, which starts becoming an issue in more complex workflows using this method.

This could be fixed by fitting an infinite line between points and then checking if they lie within tolerance from it.

Test file(s):

@pawelbaran pawelbaran added the type:bug Error or unexpected behaviour label Feb 15, 2024
@pawelbaran pawelbaran self-assigned this Feb 15, 2024
pawelbaran added a commit that referenced this issue Feb 15, 2024
@pawelbaran
Copy link
Member Author

After more experimentation I realised the changes to this particular method are not as easy to implement, plus the issues I experienced originated from other areas in the code. Therefore I will close this issue and reopen only if that becomes problematic.

@pawelbaran
Copy link
Member Author

Reopening as issues related to the tolerance of collinearity check kept on haunting me while working on #3283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant