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");
{
nodeGroupsToMerge.push_back( list<const SMDS_MeshNode*>() );
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 {
// 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
#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
CASE2MESSAGE( HYP_MISSING );
CASE2MESSAGE( HYP_NOTCONFORM );
CASE2MESSAGE( HYP_BAD_PARAMETER );
+ CASE2MESSAGE( HYP_BAD_GEOMETRY );
default: continue;
}
// apply args to message:
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"
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;