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

Bastien's last commit should allow us to remove the hack for points in

_storeVerticesInEntities.

Please SHOUT if you see something wrong when reading meshes: I'll revert the patch
parent 90f28a99
No related branches found
No related tags found
No related merge requests found
...@@ -887,13 +887,8 @@ void GModel::_storeVerticesInEntities(std::map<int, MVertex*> &vertices) ...@@ -887,13 +887,8 @@ void GModel::_storeVerticesInEntities(std::map<int, MVertex*> &vertices)
for(; it != vertices.end(); ++it){ for(; it != vertices.end(); ++it){
MVertex *v = it->second; MVertex *v = it->second;
GEntity *ge = v->onWhat(); GEntity *ge = v->onWhat();
if(ge){ if(ge) ge->mesh_vertices.push_back(v);
if(ge->dim() || ge->mesh_vertices.empty()){ // special case for points else delete v; // we delete all unused vertices
ge->mesh_vertices.push_back(v);
}
}
else
delete v; // we delete all unused vertices
} }
} }
...@@ -903,13 +898,8 @@ void GModel::_storeVerticesInEntities(std::vector<MVertex*> &vertices) ...@@ -903,13 +898,8 @@ void GModel::_storeVerticesInEntities(std::vector<MVertex*> &vertices)
MVertex *v = vertices[i]; MVertex *v = vertices[i];
if(v){ // the vector is allowed to have null entries if(v){ // the vector is allowed to have null entries
GEntity *ge = v->onWhat(); GEntity *ge = v->onWhat();
if(ge) { if(ge) ge->mesh_vertices.push_back(v);
if(ge->dim() || ge->mesh_vertices.empty()){ // special case for points else delete v; // we delete all unused vertices
ge->mesh_vertices.push_back(v);
}
}
else
delete v; // we delete all unused vertices
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment