From dd383da30713bd3122893bf26e61b5fa7a5de328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 7 Sep 2023 17:33:17 +0200 Subject: [PATCH] avoid an infinite loop in the case the source of the ray in on the face --- Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h index 17e69ff984c..2b5ccccacad 100644 --- a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h @@ -612,7 +612,11 @@ public: return pair.second == 0 ? Subdomain() : Subdomain(Subdomain_index(pair.second)); - default: /* COPLANAR */ continue; // loop + default: /* COPLANAR */ + if (!triangle.has_on(p)) + continue; // loop + else + return Subdomain(Subdomain_index((std::max)(pair.first,pair.second))); // make a canonical choice } // end switch on the orientation } // opt } // end while(true)