Partial revert of own rev44548.
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 5 Nov 2012 12:11:43 +0000 (12:11 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 5 Nov 2012 12:11:43 +0000 (12:11 +0000)
That was more like workaround which solved particular issue with freestyle
rendering, but introduced some more uncontrollable issues, main of which is
recursive fracture would likely suffer from non-manifolds results of previous
step.

Boolean operation is not the only way to generate zero-area face, it could
also happen with character animation and it's indeed better be solved from
freestule side.

This should fix: #33041 Boolean difference sometimes produces meshes with holes

intern/bsp/intern/BOP_CarveInterface.cpp

index 49c999a1dd4702232385032c27521b0dbb6d90ed..f7da76e57945acf770bdd016cc661e2050e02bef 100644 (file)
@@ -559,8 +559,6 @@ static bool Carve_checkDegeneratedFace(std::map<MeshSet<3>::vertex_t*, uint> *ve
 
                if (v1 == v2 || v2 == v3 || v1 == v3)
                        return true;
-
-               return triangleArea(face->edge->prev->vert->v, face->edge->vert->v, face->edge->next->vert->v) < DBL_EPSILON;
        }
        else if (face->n_edges == 4) {
                uint v1, v2, v3, v4;
@@ -572,9 +570,6 @@ static bool Carve_checkDegeneratedFace(std::map<MeshSet<3>::vertex_t*, uint> *ve
 
                if (v1 == v2 || v1 == v3 || v1 == v4 || v2 == v3 || v2 == v4 || v3 == v4)
                        return true;
-
-               return triangleArea(face->edge->vert->v, face->edge->next->vert->v, face->edge->next->next->vert->v) +
-                      triangleArea(face->edge->prev->vert->v, face->edge->vert->v, face->edge->next->next->vert->v) < DBL_EPSILON;
        }
 
        return false;