Skip to content
Snippets Groups Projects
Commit 233c7e34 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

[EPA] Fix test for degenerate faces.

parent 794303da
No related branches found
No related tags found
No related merge requests found
...@@ -1261,7 +1261,7 @@ bool EPA::expand(size_t pass, SimplexV* w, SimplexF* f, size_t e, SimplexHorizon ...@@ -1261,7 +1261,7 @@ bool EPA::expand(size_t pass, SimplexV* w, SimplexF* f, size_t e, SimplexHorizon
const size_t e1 = nexti[e]; const size_t e1 = nexti[e];
// case 1: the new face is not degenerated, i.e., the new face is not coplanar with the old face f. // case 1: the new face is not degenerated, i.e., the new face is not coplanar with the old face f.
if(f->n.dot(w->w) - f->d < -tolerance) if(f->n.dot(w->w - f->vertex[e]->w) < -tolerance)
{ {
SimplexF* nf = newFace(f->vertex[e1], f->vertex[e], w, false); SimplexF* nf = newFace(f->vertex[e1], f->vertex[e], w, false);
if(nf) if(nf)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment