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

Make segment_segment_distance_and_normal compute KKT-valid normals in all cases #42

Open
girving opened this issue Jun 25, 2013 · 0 comments
Labels

Comments

@girving
Copy link
Contributor

girving commented Jun 25, 2013

The segment_segment_distance_and_normal routine fails the KKT conditions in certain degenerate cases. This occurs only when the closest points are vertices of both segments, since the normal computed by segment_point_distance_and_normal is not consistent with the other segment.

Unit tests that catch this case are already written: to reproduce remove the

// TODO: Make stronger assertions unconditional once the code is fixed` conditions in `segment_tests

in Segment.cpp introduced by 22287e9.

girving added a commit to bantamtools/geode that referenced this issue Apr 28, 2015
Segment-point, segment-segment, line-point, and line-line distance
computation should be now be as numerically stable as possible,
including optional computation of weights and normals (normalized
vectors between closest points).  The current segment-segment normal
computation is slightly flawed, and occasionally violates the KKT
conditions (see otherlab#42).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant