From: eap Date: Thu, 3 May 2007 14:05:52 +0000 (+0000) Subject: fix algo state message when Hexahedron(i,j,k) assigned to a compound X-Git-Tag: T_PAL_15278~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b5828c7772726a4176a497af29a46720741c5747;p=modules%2Fsmesh.git fix algo state message when Hexahedron(i,j,k) assigned to a compound of non-block shapes --- diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 3c34f2e63..f3f25d9e2 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -322,7 +322,11 @@ static bool checkMissing(SMESH_Gen* aGen, if ( status == SMESH_Hypothesis::HYP_BAD_PARAMETER ) { INFOS( "ERROR: hypothesis of " << (IsGlobalHypothesis ? "Global " : "Local ") << "<" << algo->GetName() << "> has a bad parameter value"); - errName = SMESH_Hypothesis::HYP_BAD_PARAMETER; + errName = status; + } else if ( status == SMESH_Hypothesis::HYP_BAD_GEOMETRY ) { + INFOS( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ") + << "<" << algo->GetName() << "> assigned to mismatching geometry"); + errName = status; } else { INFOS( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ") << "<" << algo->GetName() << "> misses some hypothesis"); diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 89fd80c5a..66ec1d36a 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -5712,7 +5712,7 @@ SMESH_MeshEditor::Sew_Error { nodeGroupsToMerge.push_back( list() ); nodeGroupsToMerge.back().push_back( *nIt[1] ); // to keep - nodeGroupsToMerge.back().push_back( *nIt[0] ); // tp remove + nodeGroupsToMerge.back().push_back( *nIt[0] ); // to remove } } else { diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 3af807281..ef34015fe 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1604,7 +1604,7 @@ bool SMESH_subMesh::CheckComputeError(SMESH_Algo* theAlgo) // Show error SMESH_Comment text; - text << theAlgo->GetName() << " failed on subshape " << _Id << " with error "; + text << theAlgo->GetName() << " failed on subshape #" << _Id << " with error "; if (_computeError->IsCommon() ) text << _computeError->CommonName(); else @@ -1615,11 +1615,12 @@ bool SMESH_subMesh::CheckComputeError(SMESH_Algo* theAlgo) #ifdef _DEBUG_ cout << text << endl; // Show vertices location of a failed shape - cout << "Subshape vertices (first 10):" << endl; TopTools_IndexedMapOfShape vMap; TopExp::MapShapes( _subShape, TopAbs_VERTEX, vMap ); + cout << "Subshape vertices " << ( vMap.Extent()>10 ? "(first 10):" : ":") << endl; for ( int iv = 1; iv <= vMap.Extent() && iv < 11; ++iv ) { gp_Pnt P( BRep_Tool::Pnt( TopoDS::Vertex( vMap( iv ) ))); + cout << "#" << _father->GetMeshDS()->ShapeToIndex( vMap( iv )) << " "; cout << P.X() << " " << P.Y() << " " << P.Z() << " " << endl; } #else diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 8f40e2b85..a21492653 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -598,6 +598,7 @@ namespace SMESH{ CASE2MESSAGE( HYP_MISSING ); CASE2MESSAGE( HYP_NOTCONFORM ); CASE2MESSAGE( HYP_BAD_PARAMETER ); + CASE2MESSAGE( HYP_BAD_GEOMETRY ); default: continue; } // apply args to message: diff --git a/src/SMESHGUI/SMESH_msg_en.po b/src/SMESHGUI/SMESH_msg_en.po index 651f492ee..11592208c 100644 --- a/src/SMESHGUI/SMESH_msg_en.po +++ b/src/SMESHGUI/SMESH_msg_en.po @@ -1328,6 +1328,9 @@ msgstr "Hypothesis of %3 %2D algorithm \"%1\" has a bad parameter value" msgid "STATE_HYP_NOTCONFORM" msgstr "%3 %2D algorithm \"%1\" would produce not conform mesh: global \"Not Conform Mesh Allowed\" hypotesis is missing" +msgid "STATE_HYP_BAD_GEOMETRY" +msgstr "%3 %2D algorithm \"%1\" is assigned to geometry mismatching its expectation" + msgid "GLOBAL_ALGO" msgstr "Global" diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index 80cd6caeb..a92e94b84 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -122,7 +122,9 @@ bool StdMeshers_Hexa_3D::CheckHypothesis int nbFaces = 0; for (TopExp_Explorer exp(aShape, TopAbs_FACE); exp.More(); exp.Next()) if ( ++nbFaces > 6 ) - return false; + break; + if ( nbFaces != 6 ) + return false; aStatus = SMESH_Hypothesis::HYP_OK; return true;