use new method SMESH_subMesh::GetAlgo()

This commit is contained in:
eap 2011-10-28 12:55:08 +00:00
parent 2c766c3b15
commit e182c4b354
3 changed files with 5 additions and 10 deletions

View File

@ -172,8 +172,7 @@ namespace {
if ( subMesh->GetAlgoState() != SMESH_subMesh::HYP_OK )
hypRemoved = true;
else {
SMESH_Gen * gen = subMesh->GetFather()->GetGen();
SMESH_Algo* algo = gen->GetAlgo( *subMesh->GetFather(), subMesh->GetSubShape() );
SMESH_Algo* algo = subMesh->GetAlgo();
hypRemoved = ( string( algo->GetName() ) != StdMeshers_CompositeSegment_1D::AlgoName());
}
if ( hypRemoved )

View File

@ -413,8 +413,7 @@ namespace // INTERNAL STUFF
{
// re-call SetEventListener() to take into account valid parameters
// of ImportSource hypothesis
SMESH_Gen* gen = subMesh->GetFather()->GetGen();
if ( SMESH_Algo* algo = gen->GetAlgo(*subMesh->GetFather(), subMesh->GetSubShape()))
if ( SMESH_Algo* algo = subMesh->GetAlgo() )
algo->SetEventListener( subMesh );
}
}
@ -461,8 +460,7 @@ namespace // INTERNAL STUFF
SMESH_subMesh::REMOVE_FATHER_ALGO == event ) &&
SMESH_subMesh::ALGO_EVENT == eventType )
{
SMESH_Gen* gen = subMesh->GetFather()->GetGen();
SMESH_Algo* algo = gen->GetAlgo(*subMesh->GetFather(),subMesh->GetSubShape() );
SMESH_Algo* algo = subMesh->GetAlgo();
removeImport = ( strncmp( "Import", algo->GetName(), 6 ) != 0 );
}

View File

@ -1940,7 +1940,7 @@ bool StdMeshers_ProjectionUtils::MakeComputed(SMESH_subMesh * sm, const int iter
SMESH_Mesh* mesh = sm->GetFather();
SMESH_Gen* gen = mesh->GetGen();
SMESH_Algo* algo = gen->GetAlgo( *mesh, sm->GetSubShape() );
SMESH_Algo* algo = sm->GetAlgo();
if ( !algo )
{
if ( sm->GetSubShape().ShapeType() != TopAbs_COMPOUND )
@ -2080,9 +2080,7 @@ namespace {
// delete current source listener
subMesh->DeleteEventListener( GetSrcSubMeshListener() );
// let algo set a new one
SMESH_Gen* gen = subMesh->GetFather()->GetGen();
if ( SMESH_Algo* algo = gen->GetAlgo( *subMesh->GetFather(),
subMesh->GetSubShape() ))
if ( SMESH_Algo* algo = subMesh->GetAlgo() )
algo->SetEventListener( subMesh );
}
}