mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-30 19:30:35 +05:00
PAL8196. Do not operate with hypothesis for a geom group member which is not a sub-shape of the main shape
This commit is contained in:
parent
c24470c4ac
commit
e958f3ed7d
@ -267,14 +267,17 @@ SMESH_Hypothesis::Hypothesis_Status
|
|||||||
|
|
||||||
SMESH_subMesh *subMesh = GetSubMesh(aSubShape);
|
SMESH_subMesh *subMesh = GetSubMesh(aSubShape);
|
||||||
SMESHDS_SubMesh *subMeshDS = subMesh->GetSubMeshDS();
|
SMESHDS_SubMesh *subMeshDS = subMesh->GetSubMeshDS();
|
||||||
if ( subMeshDS && subMeshDS->IsComplexSubmesh() )
|
if ( subMeshDS && subMeshDS->IsComplexSubmesh() ) // group of sub-shapes and maybe of not sub-
|
||||||
{
|
{
|
||||||
|
MESSAGE("AddHypothesis() to complex submesh");
|
||||||
// return the worst but not fatal state of all group memebers
|
// return the worst but not fatal state of all group memebers
|
||||||
SMESH_Hypothesis::Hypothesis_Status aBestRet, aWorstNotFatal, ret;
|
SMESH_Hypothesis::Hypothesis_Status aBestRet, aWorstNotFatal, ret;
|
||||||
aBestRet = SMESH_Hypothesis::HYP_BAD_DIM;
|
aBestRet = SMESH_Hypothesis::HYP_BAD_DIM;
|
||||||
aWorstNotFatal = SMESH_Hypothesis::HYP_OK;
|
aWorstNotFatal = SMESH_Hypothesis::HYP_OK;
|
||||||
for ( TopoDS_Iterator itS ( aSubShape ); itS.More(); itS.Next())
|
for ( TopoDS_Iterator itS ( aSubShape ); itS.More(); itS.Next())
|
||||||
{
|
{
|
||||||
|
if ( !GetMeshDS()->ShapeToIndex( itS.Value() ))
|
||||||
|
continue; // not sub-shape
|
||||||
ret = AddHypothesis( itS.Value(), anHypId );
|
ret = AddHypothesis( itS.Value(), anHypId );
|
||||||
if ( !SMESH_Hypothesis::IsStatusFatal( ret ) && ret > aWorstNotFatal )
|
if ( !SMESH_Hypothesis::IsStatusFatal( ret ) && ret > aWorstNotFatal )
|
||||||
aWorstNotFatal = ret;
|
aWorstNotFatal = ret;
|
||||||
@ -380,6 +383,8 @@ SMESH_Hypothesis::Hypothesis_Status
|
|||||||
aWorstNotFatal = SMESH_Hypothesis::HYP_OK;
|
aWorstNotFatal = SMESH_Hypothesis::HYP_OK;
|
||||||
for ( TopoDS_Iterator itS ( aSubShape ); itS.More(); itS.Next())
|
for ( TopoDS_Iterator itS ( aSubShape ); itS.More(); itS.Next())
|
||||||
{
|
{
|
||||||
|
if ( !GetMeshDS()->ShapeToIndex( itS.Value() ))
|
||||||
|
continue; // not sub-shape
|
||||||
ret = RemoveHypothesis( itS.Value(), anHypId );
|
ret = RemoveHypothesis( itS.Value(), anHypId );
|
||||||
if ( !SMESH_Hypothesis::IsStatusFatal( ret ) && ret > aWorstNotFatal )
|
if ( !SMESH_Hypothesis::IsStatusFatal( ret ) && ret > aWorstNotFatal )
|
||||||
aWorstNotFatal = ret;
|
aWorstNotFatal = ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user