X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Gen.cxx;h=f70bb64fc0deafaf77ed8c3226edb87822b8f687;hb=c84ff91c3981488e5a5ae5c6661899f48872290d;hp=d68dce5af03d6a3479da5e7f1b38a205220d4a3d;hpb=f8658faa90201a4e88a52279b6faf0d435917b6e;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index d68dce5af..f70bb64fc 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -47,6 +47,10 @@ #include "memoire.h" +#ifdef WNT + #include +#endif + using namespace std; //============================================================================= @@ -375,7 +379,9 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, { SMESH_MesherHelper aHelper( aMesh ); if ( aHelper.IsQuadraticMesh() != SMESH_MesherHelper::LINEAR ) - aHelper.FixQuadraticElements(); + { + aHelper.FixQuadraticElements( sm->GetComputeError() ); + } } return ret; } @@ -583,6 +589,8 @@ static bool checkConformIgnoredAlgos(SMESH_Mesh& aMesh, if ( aLocIgnoAlgo ) // algo is hidden by a local algo of upper dim { + theErrors.push_back( SMESH_Gen::TAlgoStateError() ); + theErrors.back().Set( SMESH_Hypothesis::HYP_HIDDEN_ALGO, algo, false ); INFOS( "Local <" << algo->GetName() << "> is hidden by local <" << aLocIgnoAlgo->GetName() << ">"); } @@ -595,6 +603,8 @@ static bool checkConformIgnoredAlgos(SMESH_Mesh& aMesh, if ( dim < aMaxGlobIgnoDim ) { // algo is hidden by a global algo + theErrors.push_back( SMESH_Gen::TAlgoStateError() ); + theErrors.back().Set( SMESH_Hypothesis::HYP_HIDDEN_ALGO, algo, true ); INFOS( ( isGlobal ? "Global" : "Local" ) << " <" << algo->GetName() << "> is hidden by global <" << aGlobIgnoAlgo->GetName() << ">"); @@ -1020,9 +1030,9 @@ namespace // Access to type of input and output of an algorithm // Read Plugin.xml files vector< string > xmlPaths = SMESH_Gen::GetPluginXMLPaths(); LDOMParser xmlParser; - for ( size_t i = 0; i < xmlPaths.size(); ++i ) + for ( size_t iXML = 0; iXML < xmlPaths.size(); ++iXML ) { - bool error = xmlParser.parse( xmlPaths[i].c_str() ); + bool error = xmlParser.parse( xmlPaths[iXML].c_str() ); if ( error ) { TCollection_AsciiString data; @@ -1044,6 +1054,7 @@ namespace // Access to type of input and output of an algorithm TCollection_AsciiString input = algoElem.getAttribute("input"); TCollection_AsciiString output = algoElem.getAttribute("output"); TCollection_AsciiString dim = algoElem.getAttribute("dim"); + if ( algoType.IsEmpty() ) continue; AlgoData & data = theDataByName[ algoType.ToCString() ]; data._dim = dim.IntegerValue(); for ( int isInput = 0; isInput < 2; ++isInput ) @@ -1106,9 +1117,11 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh & aMesh, TopoDS_Shape assignedToShape2; SMESH_Algo* algo2 = (SMESH_Algo*) aMesh.GetHypothesis( aShape, filter, true, &assignedToShape2 ); - if ( algo2 && - assignedToShape2.ShapeType() == assignedToShape.ShapeType() && - aMesh.IsOrderOK( aMesh.GetSubMesh( assignedToShape2 ), + if ( algo2 && // algo found + !assignedToShape2.IsSame( aMesh.GetShapeToMesh() ) && // algo is local + ( SMESH_MesherHelper::GetGroupType( assignedToShape2 ) == // algo of the same level + SMESH_MesherHelper::GetGroupType( assignedToShape )) && + aMesh.IsOrderOK( aMesh.GetSubMesh( assignedToShape2 ), // no forced order aMesh.GetSubMesh( assignedToShape ))) { // get algos on the adjacent SOLIDs @@ -1120,7 +1133,7 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh & aMesh, if ( SMESH_Algo* algo3D = (SMESH_Algo*) aMesh.GetHypothesis( *solid, filter, true )) { algos3D.push_back( algo3D ); - filter.AndNot( filter.Is( algo3D )); + filter.AndNot( filter.HasName( algo3D->GetName() )); } // check compatibility of algos if ( algos3D.size() > 1 )