From d0a8161dd0438fee1d5aeb660d421d0feac54cd3 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 5 Jan 2010 14:02:04 +0000
Subject: [PATCH] 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
---
 Geo/GModel.cpp | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp
index 012d00644b..d07ee4dc77 100644
--- a/Geo/GModel.cpp
+++ b/Geo/GModel.cpp
@@ -887,13 +887,8 @@ void GModel::_storeVerticesInEntities(std::map<int, MVertex*> &vertices)
   for(; it != vertices.end(); ++it){
     MVertex *v = it->second;
     GEntity *ge = v->onWhat();
-    if(ge){
-      if(ge->dim() || ge->mesh_vertices.empty()){ // special case for points
-        ge->mesh_vertices.push_back(v);
-      }
-    }
-    else
-      delete v; // we delete all unused vertices
+    if(ge) 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)
     MVertex *v = vertices[i];
     if(v){ // the vector is allowed to have null entries
       GEntity *ge = v->onWhat();
-      if(ge) {
-        if(ge->dim() || ge->mesh_vertices.empty()){ // special case for points
-          ge->mesh_vertices.push_back(v);
-        }
-      }
-      else
-        delete v; // we delete all unused vertices
+      if(ge) ge->mesh_vertices.push_back(v);
+      else delete v; // we delete all unused vertices
     }
   }
 }
-- 
GitLab