avoid an infinite loop in the case the source of the ray in on the face

This commit is contained in:
Sébastien Loriot 2023-09-07 17:33:17 +02:00
parent a8fae00bf1
commit dd383da307
1 changed files with 5 additions and 1 deletions

View File

@ -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)