Salome HOME
Regression of XSMESH_TEST/SMESHCOMMON/SMESH_TEST/Grids/smesh/bugs12/M6
authoreap <eap@opencascade.com>
Fri, 26 Apr 2013 11:46:58 +0000 (11:46 +0000)
committereap <eap@opencascade.com>
Fri, 26 Apr 2013 11:46:58 +0000 (11:46 +0000)
Fix the ensuring stability of SMESH_MeshEditor::makeWalls(). Allow
storing both nodes and cells in one map sorted by ID.

struct TIDCompare {
   bool operator () (const SMDS_MeshElement* e1, const SMDS_MeshElement* e2) const
-  { return e1->GetID() < e2->GetID(); }
+  { return e1->GetType() == e2->GetType() ? e1->GetID() < e2->GetID() : e1->GetType() < e2->GetType(); }

src/SMDS/SMDS_MeshElement.hxx

index 44d8556222f50144898a69844bc24a3d46896928..ccb4373a92b5d6c542b0303f0d10f89009e66d7f 100644 (file)
@@ -198,7 +198,7 @@ protected:
 
 struct TIDCompare {
   bool operator () (const SMDS_MeshElement* e1, const SMDS_MeshElement* e2) const
 
 struct TIDCompare {
   bool operator () (const SMDS_MeshElement* e1, const SMDS_MeshElement* e2) const
-  { return e1->GetID() < e2->GetID(); }
+  { return e1->GetType() == e2->GetType() ? e1->GetID() < e2->GetID() : e1->GetType() < e2->GetType(); }
 };
 
 #endif
 };
 
 #endif