PAL11200. SMESH_Hypothesis::HYP_BAD_SUBSHAPE status added

This commit is contained in:
eap 2006-02-16 13:43:27 +00:00
parent 73b8b394ec
commit df3619cd79
4 changed files with 12 additions and 1 deletions

View File

@ -49,7 +49,8 @@ public:
HYP_INCOMPATIBLE, // hypothesis does not fit algo
HYP_NOTCONFORM, // not conform mesh is produced appling a hypothesis
HYP_ALREADY_EXIST,// such hypothesis already exist
HYP_BAD_DIM // bad dimension
HYP_BAD_DIM, // bad dimension
HYP_BAD_SUBSHAPE // shape is neither the main one, nor its subshape, nor a group
};
static bool IsStatusFatal(Hypothesis_Status theStatus)
{ return theStatus >= HYP_UNKNOWN_FATAL; }

View File

@ -267,6 +267,9 @@ SMESH_Hypothesis::Hypothesis_Status
if(MYDEBUG) MESSAGE("SMESH_Mesh::AddHypothesis");
SMESH_subMesh *subMesh = GetSubMesh(aSubShape);
if ( !subMesh || !subMesh->GetId())
return SMESH_Hypothesis::HYP_BAD_SUBSHAPE;
SMESHDS_SubMesh *subMeshDS = subMesh->GetSubMeshDS();
if ( subMeshDS && subMeshDS->IsComplexSubmesh() ) // group of sub-shapes and maybe of not sub-
{
@ -628,6 +631,8 @@ SMESH_subMesh *SMESH_Mesh::GetSubMesh(const TopoDS_Shape & aSubShape)
if ( it.More() )
index = _myMeshDS->AddCompoundSubmesh( aSubShape, it.Value().ShapeType() );
}
// if ( !index )
// return NULL; // neither sub-shape nor a group
map <int, SMESH_subMesh *>::iterator i_sm = _mapSubMesh.find(index);
if ( i_sm != _mapSubMesh.end())

View File

@ -1219,6 +1219,9 @@ msgstr "Such dimention hypothesis is already assigned to the shape"
msgid "SMESH_HYP_8"
msgstr "Hypothesis and submesh dimensions mismatch"
msgid "SMESH_HYP_9"
msgstr "Shape is neither the main one, nor its subshape, nor a valid group"
msgid "MISSING_ALGO"
msgstr "%3 %2D algorithm is missing"

View File

@ -316,6 +316,8 @@ static SMESH::Hypothesis_Status ConvertHypothesisStatus
res = SMESH::HYP_ALREADY_EXIST; break;
case SMESH_Hypothesis::HYP_BAD_DIM:
res = SMESH::HYP_BAD_DIM; break;
case SMESH_Hypothesis::HYP_BAD_SUBSHAPE:
res = SMESH::HYP_BAD_SUBSHAPE; break;
default:
res = SMESH::HYP_UNKNOWN_FATAL;
}