Skip to content

Fix ConvexHullPairTester get wrong contacts with parallel edges cases#329

Open
Pro-Ly wants to merge 1 commit intobepu:masterfrom
Pro-Ly:master
Open

Fix ConvexHullPairTester get wrong contacts with parallel edges cases#329
Pro-Ly wants to merge 1 commit intobepu:masterfrom
Pro-Ly:master

Conversation

@Pro-Ly
Copy link
Copy Markdown

@Pro-Ly Pro-Ly commented May 26, 2024

There is a bug in convexhull tester: when one edge from shape B's face perform clipping with shape A'face find two edges parallel, it will override the right result to invalid.

In fact. I believe that there is no need to do anything with parallel edge cases. They will be filtered in the later "if (earliestExit >= latestEntry)" judgements.

@RossNordby
Copy link
Copy Markdown
Member

Thanks; I'm traveling, so it will take a while for me to check this out in depth. This part of the pair tester involves some extremely subtle details if I remember correctly. I'm going to have to stare at it for a while. If you have a reliable reproduction case for the bug (e.g. a convexhull and a set of poses which shows the failure), that'd help me a lot.

@RossNordby
Copy link
Copy Markdown
Member

Okay, this wins the record for slowest bug PR response in the repo's history by a long ways, but:
That specific case should only trigger when edge A is parallel to edge B and edge B is outside edge A. Due to the convexity of faces, if edge B is outside of edge A, it's outside of face A, and being parallel to an edge of face A and being outside of it means there can be no valid intersection between edge B and face A. Any intersections previously detected would be spurious and should be ignored. Deleting the condition would let those spurious intersections through to be clamped, producing incorrect contact intervals.

If there is indeed a problem, I'd suspect it's elsewhere and would probably need a repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants