Browse Source

allow shared edge to be conflictingly oriented (#2395)

Alec Jacobson 1 year ago
parent
commit
dd9654a476
1 changed files with 6 additions and 2 deletions
  1. 6 2
      include/igl/predicates/find_intersections.cpp

+ 6 - 2
include/igl/predicates/find_intersections.cpp

@@ -77,8 +77,12 @@ IGL_INLINE bool igl::predicates::find_intersections(
       int d = F1(f,(c+2)%3);
       for(int e = 0;e<3;e++)
       {
-        // Find in opposite direction on jth face
-        if(F1(g,e) == d && F1(g,(e+1)%3) == s)
+        //// Find in opposite direction on gth face
+        //if(F1(g,e) == d && F1(g,(e+1)%3) == s)
+        // Find in either direction on gth face
+        if(
+            (F1(g,e) == d && F1(g,(e+1)%3) == s) ||
+            (F1(g,e) == s && F1(g,(e+1)%3) == d))
         {
           return c;
         }