Skip to content
Snippets Groups Projects
Commit 9f606f6c authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix crash in remeshUnrecoveredEdges
parent edc46473
No related branches found
No related tags found
No related merge requests found
...@@ -91,6 +91,7 @@ static void remeshUnrecoveredEdges(std::map<MVertex*, BDS_Point*> &recoverMapInv ...@@ -91,6 +91,7 @@ static void remeshUnrecoveredEdges(std::map<MVertex*, BDS_Point*> &recoverMapInv
for(int i = 0; i < N; i++){ for(int i = 0; i < N; i++){
MVertex *v1 = itr->ge->lines[i]->getVertex(0); MVertex *v1 = itr->ge->lines[i]->getVertex(0);
MVertex *v2 = itr->ge->lines[i]->getVertex(1); MVertex *v2 = itr->ge->lines[i]->getVertex(1);
if(recoverMapInv.count(v1) && recoverMapInv.count(v2)){
BDS_Point *pp1 = recoverMapInv[v1]; BDS_Point *pp1 = recoverMapInv[v1];
BDS_Point *pp2 = recoverMapInv[v2]; BDS_Point *pp2 = recoverMapInv[v2];
if((pp1->iD == p1 && pp2->iD == p2) || (pp1->iD == p2 && pp2->iD == p1)){ if((pp1->iD == p1 && pp2->iD == p2) || (pp1->iD == p2 && pp2->iD == p1)){
...@@ -136,6 +137,8 @@ static void remeshUnrecoveredEdges(std::map<MVertex*, BDS_Point*> &recoverMapInv ...@@ -136,6 +137,8 @@ static void remeshUnrecoveredEdges(std::map<MVertex*, BDS_Point*> &recoverMapInv
newLines.push_back(itr->ge->lines[i]); newLines.push_back(itr->ge->lines[i]);
} }
} }
}
itr->ge->lines = newLines; itr->ge->lines = newLines;
itr->ge->mesh_vertices.clear(); itr->ge->mesh_vertices.clear();
N = itr->ge->lines.size(); N = itr->ge->lines.size();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment