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 )
{
// 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 );
}
}
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 );
}
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 )
// 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 );
}
}