[Bf-blender-cvs] [16ca2952788] master: Fix New Boolean bug that left some stray vertices.

Howard Trickey noreply at git.blender.org
Fri Oct 9 16:43:20 CEST 2020


Commit: 16ca29527883d6bc6fcdaacfe063d74dc51d03c2
Author: Howard Trickey
Date:   Fri Oct 9 10:30:26 2020 -0400
Branches: master
https://developer.blender.org/rB16ca29527883d6bc6fcdaacfe063d74dc51d03c2

Fix New Boolean bug that left some stray vertices.

The routine to find dissolvable vertices had a check to ensure
that the vertex was exactly in line with the two neighbors.
I have convinced myself that this check is unneccesary (it was
failing with only a 1e-9 difference from 0 on a cross check),
so have removed it.

===================================================================

M	source/blender/blenlib/intern/mesh_boolean.cc

===================================================================

diff --git a/source/blender/blenlib/intern/mesh_boolean.cc b/source/blender/blenlib/intern/mesh_boolean.cc
index a6ab30a3b26..169687cf9d1 100644
--- a/source/blender/blenlib/intern/mesh_boolean.cc
+++ b/source/blender/blenlib/intern/mesh_boolean.cc
@@ -3113,16 +3113,8 @@ static Array<bool> find_dissolve_verts(IMesh &imesh_out, int *r_count_dissolve)
       const std::pair<const Vert *, const Vert *> &nbrs = neighbors[v_out];
       if (nbrs.first != nullptr) {
         BLI_assert(nbrs.second != nullptr);
-        const mpq3 &co1 = nbrs.first->co_exact;
-        const mpq3 &co2 = nbrs.second->co_exact;
-        const mpq3 &co = imesh_out.vert(v_out)->co_exact;
-        mpq3 dir1 = co - co1;
-        mpq3 dir2 = co2 - co;
-        mpq3 cross = mpq3::cross(dir1, dir2);
-        if (cross[0] == 0 && cross[1] == 0 && cross[2] == 0) {
-          dissolve[v_out] = true;
-          ++count;
-        }
+        dissolve[v_out] = true;
+        ++count;
       }
     }
   }



More information about the Bf-blender-cvs mailing list