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

[Mesh] Avoid false negatives during self-intersection checks #5002

Merged
merged 1 commit into from Sep 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Mod/Mesh/App/Core/Elements.cpp
Expand Up @@ -988,6 +988,12 @@ int MeshGeomFacet::IntersectWithFacet (const MeshGeomFacet& rclFacet,
rclPt0.x = isectpt1[0]; rclPt0.y = isectpt1[1]; rclPt0.z = isectpt1[2];
rclPt1.x = isectpt2[0]; rclPt1.y = isectpt2[1]; rclPt1.z = isectpt2[2];

// Note: tri_tri_intersect_with_isection() does not return line of
// intersection when triangles are coplanar. See tritritest.h:18 and 658.
// So rclPt* may be garbage values and we cannot continue.
if (coplanar)
return 2; // equivalent to rclPt0 != rclPt1

// With extremely acute-angled triangles it may happen that the algorithm
// claims an intersection but the intersection points are far outside the
// model. So, a plausibility check is to verify that the intersection points
Expand Down