Skip to content

Commit

Permalink
Merge pull request #1718 from kerautret/FixremIsolRem
Browse files Browse the repository at this point in the history
Fix slow remove isol vertices
  • Loading branch information
dcoeurjo authored Mar 9, 2024
2 parents f49e724 + c15117d commit 640fd9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@
- Fix warning related to copy assignment in class DistanceBreadthFirstVisitor
(Jacques-Olivier Lachaud, [#1662](https://github.com/DGtal-team/DGtal/pull/1662))

- *Shapes package*
- fix slow remove of isolated vertices in Mesh.
(Bertrand Kerautret, [#1718](https://github.com/DGtal-team/DGtal/pull/1718))

# DGtal 1.2

## New Features / Critical Changes
Expand Down
3 changes: 2 additions & 1 deletion src/DGtal/shapes/Mesh.ih
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,15 @@ DGtal::Mesh<TPoint>::removeIsolatedVertices(){
if (vertexUsed[i])
{
translateIndexId.push_back(currentIndex);
vSt.push_back(myVertexList[i]);
currentIndex++;
}
else
{
translateIndexId.push_back(0);
myVertexList.erase(myVertexList.begin()+currentIndex);
}
}
myVertexList = vSt;
for ( MIndex f = 0; f< nbFaces(); f++ )
{
auto &face = getFace(f);
Expand Down

0 comments on commit 640fd9e

Please sign in to comment.