]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
use new method SMESH_subMesh::GetAlgo()
authoreap <eap@opencascade.com>
Fri, 28 Oct 2011 12:55:08 +0000 (12:55 +0000)
committereap <eap@opencascade.com>
Fri, 28 Oct 2011 12:55:08 +0000 (12:55 +0000)
src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx
src/StdMeshers/StdMeshers_Import_1D.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.cxx

index 97bf06f66c724d61f89b91ca880980b7334429b4..fb8c86eb92e0de3edf7bb6dc16b84a656fbdcd15 100644 (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 )
index 649a44d96dc393de1cd0dfd9aab548fdbf277a4b..1fcd7d56005734a87b5bc40cc50601a08a198020 100644 (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 );
       }
 
index ae47622c36dff52d46afa3aee0a23cce929e3282..c6347d53a7b0087e6c3a936540e62676bcdd0731 100644 (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 );
       }
     }