Shape Healing - Regression after #584 (#769)

Second iteration of fixing regressions.
Fixed issue with loops and incorrect shell created.
#584 affected some tests which were not updated on time.
Now all test cases are passed.
This commit is contained in:
Pasukhin Dmitry
2025-10-27 21:27:16 +00:00
committed by GitHub
parent 07c8845fc8
commit 8da5219913
2 changed files with 21 additions and 3 deletions

View File

@@ -269,7 +269,25 @@ static NCollection_List<TopTools_SequenceOfShape> GetConnectedFaceGroups(
}
}
aConnectedGroups.Append(aConnectedGroup);
// Insert in sorted order (largest groups first)
Standard_Boolean anIsInserted = Standard_False;
for (NCollection_List<TopTools_SequenceOfShape>::Iterator anIter(aConnectedGroups);
anIter.More();
anIter.Next())
{
if (aConnectedGroup.Length() > anIter.Value().Length())
{
aConnectedGroups.InsertBefore(aConnectedGroup, anIter);
anIsInserted = Standard_True;
break;
}
}
if (!anIsInserted)
{
aConnectedGroups.Append(aConnectedGroup);
}
}
return aConnectedGroups;