Browse Source

Do not error when query point is coplanar with closest boundary face.

Former-commit-id: 783e82942e2b29ff3b3beda1a1fc44431251661e
Qingnan Zhou 9 years ago
parent
commit
9ac853eb95
1 changed files with 4 additions and 2 deletions
  1. 4 2
      include/igl/copyleft/cgal/closest_facet.cpp

+ 4 - 2
include/igl/copyleft/cgal/closest_facet.cpp

@@ -89,8 +89,10 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
             case CGAL::NEGATIVE:
             case CGAL::NEGATIVE:
                 return false;
                 return false;
             case CGAL::COPLANAR:
             case CGAL::COPLANAR:
-                throw std::runtime_error(
-                        "It seems input mesh contains self intersection");
+                // Warning:
+                // This can only happen if fid contains a boundary edge.
+                // Catergorized this ambiguous case as negative side.
+                return false;
             default:
             default:
                 throw std::runtime_error("Unknown CGAL state.");
                 throw std::runtime_error("Unknown CGAL state.");
         }
         }