From: eap Date: Fri, 27 Jul 2012 13:11:14 +0000 (+0000) Subject: 0021759: EDF 1785 SMESH: A group of nodes created by filters is incomplete X-Git-Tag: V6_6_0a1~221 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ae452162516b01b206c2e905d80be5c824ad5acc;hp=84cb6968f2cee953007562e4ba70c4fe6415c0b5;p=modules%2Fsmesh.git 0021759: EDF 1785 SMESH: A group of nodes created by filters is incomplete bug: elementsIterator(SMDSAbs_Node) returns nothing --- diff --git a/src/SMDS/SMDS_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index b0544d9d2..fe6f186e4 100644 --- a/src/SMDS/SMDS_Mesh.cxx +++ b/src/SMDS/SMDS_Mesh.cxx @@ -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(myCells)); - } - else - { + + case SMDSAbs_Node: + return SMDS_ElemIteratorPtr + ( new ElemVecIterator( 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(); } ///////////////////////////////////////////////////////////////////////////////