[Bf-blender-cvs] [1d447dcd191] master: Fix T83630 Exact Boolean assert failure in Debug build.

Howard Trickey noreply at git.blender.org
Thu Dec 10 15:18:32 CET 2020


Commit: 1d447dcd19120ed2fd14511589220438ce1904bc
Author: Howard Trickey
Date:   Thu Dec 10 09:11:43 2020 -0500
Branches: master
https://developer.blender.org/rB1d447dcd19120ed2fd14511589220438ce1904bc

Fix T83630 Exact Boolean assert failure in Debug build.

I thought I had reasoned that the add_patch would only happen
when the patch was not already in a cell, but I missed reasoning
about merged cells. So switched to a set 'add' instead of 'add_new'.

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

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 2db939cd628..88d90a7816f 100644
--- a/source/blender/blenlib/intern/mesh_boolean.cc
+++ b/source/blender/blenlib/intern/mesh_boolean.cc
@@ -400,11 +400,6 @@ class Cell {
   Cell() = default;
 
   void add_patch(int p)
-  {
-    patches_.add_new(p);
-  }
-
-  void add_patch_non_duplicates(int p)
   {
     patches_.add(p);
   }
@@ -693,7 +688,7 @@ static void merge_cells(int merge_to, int merge_from, CellsInfo &cinfo, PatchesI
     merge_to_cell = cinfo.cell(final_merge_to);
   }
   for (int cell_p : merge_from_cell.patches()) {
-    merge_to_cell.add_patch_non_duplicates(cell_p);
+    merge_to_cell.add_patch(cell_p);
     Patch &patch = pinfo.patch(cell_p);
     if (patch.cell_above == merge_from) {
       patch.cell_above = merge_to;



More information about the Bf-blender-cvs mailing list