- // Serve Propagation of 1D hypothesis
- // NOTE: it is possible to re-implement Propagation using EventListener
- 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