]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0021759: EDF 1785 SMESH: A group of nodes created by filters is incomplete
authoreap <eap@opencascade.com>
Fri, 27 Jul 2012 13:11:14 +0000 (13:11 +0000)
committereap <eap@opencascade.com>
Fri, 27 Jul 2012 13:11:14 +0000 (13:11 +0000)
bug: elementsIterator(SMDSAbs_Node) returns nothing

src/SMDS/SMDS_Mesh.cxx

index b0544d9d2e0a889d51e07b331096412adfafb454..fe6f186e496b9b33a9f76da95648fa5b9a0a5598 100644 (file)
@@ -2929,16 +2929,21 @@ SMDS_ElemIteratorPtr SMDS_Mesh::elementEntityIterator(SMDSAbs_EntityType type) c
 SMDS_ElemIteratorPtr SMDS_Mesh::elementsIterator(SMDSAbs_ElementType type) const
 {
   // naturally always sorted by ID
-  if ( type == SMDSAbs_All )
-  {
+  switch ( type ) {
+
+  case SMDSAbs_All:
     return SMDS_ElemIteratorPtr (new ElemVecIterator<const SMDS_MeshElement*>(myCells));
-  }
-  else
-  {
+
+  case SMDSAbs_Node:
+    return SMDS_ElemIteratorPtr
+      ( new ElemVecIterator<const SMDS_MeshElement*, SMDS_MeshNode*>( myNodes ));
+
+  default:
     typedef ElemVecIterator
       < const SMDS_MeshElement*, SMDS_MeshCell*, SMDS_MeshElement::TypeFilter > TIterator;
     return SMDS_ElemIteratorPtr (new TIterator(myCells, SMDS_MeshElement::TypeFilter( type )));
   }
+  return SMDS_ElemIteratorPtr();
 }
 
 ///////////////////////////////////////////////////////////////////////////////