瀏覽代碼

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

Former-commit-id: 783e82942e2b29ff3b3beda1a1fc44431251661e
Qingnan Zhou 9 年之前
父節點
當前提交
9ac853eb95
共有 1 個文件被更改,包括 4 次插入2 次删除
  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:
                 return false;
             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:
                 throw std::runtime_error("Unknown CGAL state.");
         }