+
+ // Serve Propagation of 1D hypothesis
+ if (event == REMOVE_HYP) {
+ bool isPropagationOk = true;
+ string hypName = anHyp->GetName();
+
+ if (hypName == "Propagation") {
+ if (_subShape.ShapeType() == TopAbs_EDGE) {
+ if (!_father->RemovePropagationChain(_subShape)) {
+ return SMESH_Hypothesis::HYP_UNKNOWN_FATAL;
+ }
+ // rebuild propagation chains, because removing one
+ // chain can resolve concurention, existing before
+ isPropagationOk = _father->RebuildPropagationChains();
+ } else {
+ TopExp_Explorer exp (_subShape, TopAbs_EDGE);
+ TopTools_MapOfShape aMap;
+ for (; exp.More(); exp.Next()) {
+ if (aMap.Add(exp.Current())) {
+ if (!_father->RemovePropagationChain(exp.Current())) {
+ return SMESH_Hypothesis::HYP_UNKNOWN_FATAL;
+ }
+ }
+ }
+ // rebuild propagation chains, because removing one
+ // chain can resolve concurention, existing before
+ if (!_father->RebuildPropagationChains()) {
+ isPropagationOk = false;
+ }
+ }
+ } else { // if (hypName == "Propagation")
+ if (anHyp->GetDim() == 1) // Only 1D hypothesis can be propagated
+ {
+ if (_subShape.ShapeType() == TopAbs_EDGE) {
+ isPropagationOk = _father->RebuildPropagationChains();
+ if (!isPropagationOk && ret < SMESH_Hypothesis::HYP_CONCURENT)
+ ret = SMESH_Hypothesis::HYP_CONCURENT;
+ }
+ }
+ }
+
+ if (!isPropagationOk && ret < SMESH_Hypothesis::HYP_CONCURENT) {
+ ret = SMESH_Hypothesis::HYP_CONCURENT;
+ }
+ } // Serve Propagation of 1D hypothesis