mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
0020206: EDF SMESH 987: Netgen1D2D3D +submesh
clear mesh if an added local algorithm hides a global all-dimensional one
This commit is contained in:
parent
e49d9ab359
commit
7462200bee
@ -609,6 +609,7 @@ SMESH_Hypothesis::Hypothesis_Status
|
|||||||
|
|
||||||
int oldAlgoState = _algoState;
|
int oldAlgoState = _algoState;
|
||||||
bool modifiedHyp = (event == MODIF_HYP); // if set to true, force event MODIF_ALGO_STATE
|
bool modifiedHyp = (event == MODIF_HYP); // if set to true, force event MODIF_ALGO_STATE
|
||||||
|
bool needFullClean = false;
|
||||||
|
|
||||||
bool isApplicableHyp = IsApplicableHypotesis( anHyp );
|
bool isApplicableHyp = IsApplicableHypotesis( anHyp );
|
||||||
|
|
||||||
@ -625,6 +626,15 @@ SMESH_Hypothesis::Hypothesis_Status
|
|||||||
// ----------------------
|
// ----------------------
|
||||||
if (isApplicableHyp && !_father->IsNotConformAllowed() && !IsConform( algo ))
|
if (isApplicableHyp && !_father->IsNotConformAllowed() && !IsConform( algo ))
|
||||||
return SMESH_Hypothesis::HYP_NOTCONFORM;
|
return SMESH_Hypothesis::HYP_NOTCONFORM;
|
||||||
|
|
||||||
|
// check if all-dimensional algo is hidden by other local one
|
||||||
|
if ( event == ADD_ALGO ) {
|
||||||
|
SMESH_HypoFilter filter( SMESH_HypoFilter::HasType( algo->GetType() ));
|
||||||
|
filter.Or( SMESH_HypoFilter::HasType( algo->GetType()+1 ));
|
||||||
|
filter.Or( SMESH_HypoFilter::HasType( algo->GetType()+2 ));
|
||||||
|
if ( SMESH_Algo * curAlgo = (SMESH_Algo*) _father->GetHypothesis( _subShape, filter, true ))
|
||||||
|
needFullClean = ( !curAlgo->NeedDescretBoundary() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
@ -658,10 +668,7 @@ SMESH_Hypothesis::Hypothesis_Status
|
|||||||
// clean all mesh in the tree of the current submesh;
|
// clean all mesh in the tree of the current submesh;
|
||||||
// we must perform it now because later
|
// we must perform it now because later
|
||||||
// we will have no information about the type of the removed algo
|
// we will have no information about the type of the removed algo
|
||||||
CleanDependants();
|
needFullClean = true;
|
||||||
ComputeStateEngine( CLEAN );
|
|
||||||
CleanDependsOn();
|
|
||||||
ComputeSubMeshStateEngine( CHECK_COMPUTE_STATE );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1012,6 +1019,13 @@ SMESH_Hypothesis::Hypothesis_Status
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( needFullClean ) {
|
||||||
|
// added or removed algo is all-dimensional
|
||||||
|
ComputeStateEngine( CLEAN );
|
||||||
|
CleanDependsOn();
|
||||||
|
ComputeSubMeshStateEngine( CHECK_COMPUTE_STATE );
|
||||||
|
}
|
||||||
|
|
||||||
if (stateChange || modifiedHyp)
|
if (stateChange || modifiedHyp)
|
||||||
ComputeStateEngine(MODIF_ALGO_STATE);
|
ComputeStateEngine(MODIF_ALGO_STATE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user