X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Measurements_i.cxx;h=2fcac5a7f9122551b4efb276f0f3c77fd0daf3a0;hb=3fcd996c94995fd28d9a8b52495aebe30b3b9632;hp=ca0103c016e6cb9994a8eb21f1d0ef7c35dcb8cf;hpb=c656333fb4f2415a0b88821a721072f28b30a53a;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_Measurements_i.cxx b/src/SMESH_I/SMESH_Measurements_i.cxx index ca0103c01..2fcac5a7f 100644 --- a/src/SMESH_I/SMESH_Measurements_i.cxx +++ b/src/SMESH_I/SMESH_Measurements_i.cxx @@ -255,16 +255,13 @@ static void enlargeBoundingBox(const SMESH::SMESH_IDSource_ptr theObject, enlargeBoundingBox( aMesh->FindNode( aElementsId[i] ), theMeasure); else { - const SMDS_MeshElement* elem = aMesh->FindElement( aElementsId[i] ); - if (!elem) - continue; - SMDS_ElemIteratorPtr aNodeIter = elem->nodesIterator(); - while( aNodeIter->more() ) - enlargeBoundingBox( dynamic_cast( aNodeIter->next() ), theMeasure); + if ( const SMDS_MeshElement* elem = aMesh->FindElement( aElementsId[i] )) + for (SMDS_NodeIteratorPtr aNodeIter = elem->nodeIterator(); aNodeIter->more(); ) + enlargeBoundingBox( aNodeIter->next(), theMeasure); } } } - + //======================================================================= // name : BoundingBox // Purpose : compute common bounding box of entities