-
Notifications
You must be signed in to change notification settings - Fork 110
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
fixed unexpected behavior for opposite parallel planes. #1435
fixed unexpected behavior for opposite parallel planes. #1435
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for noticing this and proposing a fix...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the fix is great, but could you add a test that proves the problem is solved?
Isn't the Docstring Example sufficient..? Or do you guys not run |
the examples in the docs are tested. however, examples are not necessarily meant to be formulated as tests, but rather explanations for users on how to use the advertised functionality. in many case some of the examples will indeed overlap with some of the tests, but ideally tests for example also address things like boundary cases, which simple examples usually don't. currently our test coverage is not nearly sufficient, but we are trying to work towards this. therefore i try to make sure that at least new PRs are accompanied by tests, especially when they fix an issue. i know it is annoying but it needs to be done... |
nice find @mattiskoh I wonder whether the fix can be generalised; that is, is a tolerance is an unsigned value in general? Intuitively the suggested fix might just be broadly applicable. The precision class of OCCT utilises abs in a nr of cases https://dev.opencascade.org/doc/refman/html/class_precision.html |
Plane.is_parallel()
does not check for opposite normals and thus returns False for this edge case.Not the most elegant fix due to the
TOL.is_close()
hope it's fine like this..What type of change is this?
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CHANGELOG.md
file in theUnreleased
section under the most fitting heading (e.g.Added
,Changed
,Removed
).invoke test
).invoke lint
).compas.datastructures.Mesh
.