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'.
This commit is contained in:
Howard Trickey 2020-12-10 09:11:43 -05:00
parent 348bd319d5
commit 1d447dcd19
Notes: blender-bot 2023-02-14 06:00:44 +01:00
Referenced by issue #83630, Exact boolean modifier causes assert when adding existing item to set
1 changed files with 1 additions and 6 deletions

View File

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