diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 143c05296..a6e1bd550 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -602,8 +602,14 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape) list algoList; aMesh.GetHypotheses( aShape, filter, algoList, true ); - if (algoList.size() != 1 ) - return NULL; + + if (algoList.size() != 1 ) { // check if there is one algo several times + list ::iterator algo = algoList.begin(); + for ( ; algo != algoList.end(); ++algo ) + if ( (*algo) != algoList.front() && + (*algo)->GetName() != algoList.front()->GetName() ) + return NULL; + } return const_cast ( static_cast( algoList.front() )); }