From: eap Date: Thu, 16 Feb 2006 08:12:48 +0000 (+0000) Subject: PAL11200. Fix for a submesh on a wire X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c179781b622341c5ba80503fa4d152fab2e91f33;p=modules%2Fsmesh.git PAL11200. Fix for a submesh on a wire --- diff --git a/src/SMESH_I/SMESH_subMesh_i.cxx b/src/SMESH_I/SMESH_subMesh_i.cxx index f8ade30f5..f3aafd108 100644 --- a/src/SMESH_I/SMESH_subMesh_i.cxx +++ b/src/SMESH_I/SMESH_subMesh_i.cxx @@ -128,9 +128,8 @@ bool getSubMeshes(::SMESH_subMesh* theSubMesh, list::iterator sh = shapeList.begin(); for ( ; sh != shapeList.end(); ++sh ) { for ( TopoDS_Iterator it( *sh ); it.More(); it.Next() ) { - ::SMESH_subMesh* aSubMesh = aMesh->GetSubMeshContaining( it.Value() ); - if ( aSubMesh ) - getSubMeshes( aSubMesh, theSubMeshList ); + if ( ::SMESH_subMesh* aSubMesh = aMesh->GetSubMeshContaining( it.Value() )) + getSubMeshes( aSubMesh, theSubMeshList ); // add found submesh or explore deeper else // no submesh for a compound inside compound shapeList.push_back( it.Value() ); @@ -147,6 +146,7 @@ bool getSubMeshes(::SMESH_subMesh* theSubMesh, } break; } + default: theSubMeshList.push_back( aSubMeshDS ); } return size < theSubMeshList.size(); } @@ -274,7 +274,7 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsId() for ( int i = 0; sm != smList.end(); sm++ ) { SMDS_ElemIteratorPtr anIt = (*sm)->GetElements(); - for ( int n = aSubMeshDS->NbElements(); i < n && anIt->more(); i++ ) + for ( ; i < nbElems && anIt->more(); i++ ) aResult[i] = anIt->next()->GetID(); } }