PAL11200. Fix for a submesh on a wire

This commit is contained in:
eap 2006-02-16 08:12:48 +00:00
parent a668071aa4
commit c179781b62

View File

@ -128,9 +128,8 @@ bool getSubMeshes(::SMESH_subMesh* theSubMesh,
list<TopoDS_Shape>::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();
}
}