// File : SMESH_subMesh.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-// $Header$
//
#include "SMESH_subMesh.hxx"
int oldAlgoState = _algoState;
bool modifiedHyp = (event == MODIF_HYP); // if set to true, force event MODIF_ALGO_STATE
+ bool needFullClean = false;
bool isApplicableHyp = IsApplicableHypotesis( anHyp );
// ----------------------
if (isApplicableHyp && !_father->IsNotConformAllowed() && !IsConform( algo ))
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() );
+ }
}
// ----------------------------------
// clean all mesh in the tree of the current submesh;
// we must perform it now because later
// we will have no information about the type of the removed algo
- CleanDependants();
- ComputeStateEngine( CLEAN );
- CleanDependsOn();
- ComputeSubMeshStateEngine( CHECK_COMPUTE_STATE );
+ needFullClean = true;
}
}
}
}
}
+ if ( needFullClean ) {
+ // added or removed algo is all-dimensional
+ ComputeStateEngine( CLEAN );
+ CleanDependsOn();
+ ComputeSubMeshStateEngine( CHECK_COMPUTE_STATE );
+ }
+
if (stateChange || modifiedHyp)
ComputeStateEngine(MODIF_ALGO_STATE);