From ae452162516b01b206c2e905d80be5c824ad5acc Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 27 Jul 2012 13:11:14 +0000 Subject: [PATCH] 0021759: EDF 1785 SMESH: A group of nodes created by filters is incomplete bug: elementsIterator(SMDSAbs_Node) returns nothing --- src/SMDS/SMDS_Mesh.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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(); } /////////////////////////////////////////////////////////////////////////////// -- 2.39.2