+
+ // Serve Propagation of 1D hypothesis
+ if (event == REMOVE_HYP)
+ {
+ bool isPropagationOk = true;
+ SMESH_HypoFilter propagFilter( SMESH_HypoFilter::HasName( "Propagation" ));
+ bool isPropagationHyp = propagFilter.IsOk( anHyp, _subShape );
+
+ if ( isPropagationHyp )
+ {
+ TopExp_Explorer exp (_subShape, TopAbs_EDGE);
+ TopTools_MapOfShape aMap;
+ for (; exp.More(); exp.Next()) {
+ if (aMap.Add(exp.Current()) &&
+ !_father->GetHypothesis( exp.Current(), propagFilter, true )) {
+ // no more Propagation on the current edge
+ if (!_father->RemovePropagationChain(exp.Current())) {
+ return SMESH_Hypothesis::HYP_UNKNOWN_FATAL;
+ }
+ }
+ }
+ // rebuild propagation chains, because removing one
+ // chain can resolve concurention, existing before
+ isPropagationOk = _father->RebuildPropagationChains();
+ }
+ else if (anHyp->GetDim() == 1) // Only 1D hypothesis can be propagated
+ {
+ isPropagationOk = _father->RebuildPropagationChains();
+ }
+
+ if ( isPropagationOk ) {
+ if ( isPropagationHyp )
+ return ret; // nothing more to do for "Propagation" hypothesis
+ }
+ else if ( ret < SMESH_Hypothesis::HYP_CONCURENT) {
+ ret = SMESH_Hypothesis::HYP_CONCURENT;
+ }
+ } // Serve Propagation of 1D hypothesis
+ else // event == REMOVE_ALGO
+ {
+ SMESH_Algo* algo = dynamic_cast<SMESH_Algo*> (anHyp);
+ if (!algo->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();
+ }
+ }