From e182c4b35455fd7e29ce02717480529a557ea27a Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 28 Oct 2011 12:55:08 +0000 Subject: [PATCH] use new method SMESH_subMesh::GetAlgo() --- src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx | 3 +-- src/StdMeshers/StdMeshers_Import_1D.cxx | 6 ++---- src/StdMeshers/StdMeshers_ProjectionUtils.cxx | 6 ++---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx b/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx index 97bf06f66..fb8c86eb9 100644 --- a/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx +++ b/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx @@ -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 ) diff --git a/src/StdMeshers/StdMeshers_Import_1D.cxx b/src/StdMeshers/StdMeshers_Import_1D.cxx index 649a44d96..1fcd7d560 100644 --- a/src/StdMeshers/StdMeshers_Import_1D.cxx +++ b/src/StdMeshers/StdMeshers_Import_1D.cxx @@ -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 ); } diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx index ae47622c3..c6347d53a 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx @@ -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 ); } } -- 2.39.2