+ for ( int iF = 1; iF <= hypFaces.Extent(); ++iF )
+ TopExp::MapShapesAndAncestors( hypFaces(iF), TopAbs_EDGE, TopAbs_FACE, facesOfEdgeMap);
+ for ( int iE = 1; iE <= facesOfEdgeMap.Extent(); ++iE )
+ if ( facesOfEdgeMap( iE ).Extent() > 1 )
+ sharedEdges.Add( facesOfEdgeMap.FindKey( iE ));
+
+ // fill _hypOfEdge
+ if ( _hyps.size() > 1 )
+ {
+ // check if two hypotheses define different parameters for the same EDGE
+ for ( size_t iWire = 0; iWire < _faceSideVec.size(); ++iWire )
+ {
+ StdMeshers_FaceSidePtr wire = _faceSideVec[ iWire ];
+ for ( int iE = 0; iE < wire->NbEdges(); ++iE )
+ {
+ const THypVL* hyp = 0;
+ const TGeomID edgeID = wire->EdgeID( iE );
+ if ( !sharedEdges.Contains( wire->Edge( iE )))
+ {
+ for ( size_t i = 0; i < ignoreEdgesOfHyp.size(); ++i )
+ if ( ! ignoreEdgesOfHyp[i].first.count( edgeID ))
+ {
+ if ( hyp )
+ return error(SMESH_Comment("Several hypotheses define "
+ "Viscous Layers on the edge #") << edgeID );
+ hyp = ignoreEdgesOfHyp[i].second;
+ }
+ }
+ _hypOfEdge.push_back( hyp );
+ if ( !hyp )
+ _ignoreShapeIds.insert( edgeID );
+ }
+ // check if two hypotheses define different number of viscous layers for
+ // adjacent EDGEs
+ const THypVL *hyp, *prevHyp = _hypOfEdge.back();
+ size_t iH = _hypOfEdge.size() - wire->NbEdges();
+ for ( ; iH < _hypOfEdge.size(); ++iH )
+ {
+ hyp = _hypOfEdge[ iH ];
+ if ( hyp && prevHyp &&
+ hyp->GetNumberLayers() != prevHyp->GetNumberLayers() )
+ {
+ return error("Two hypotheses define different number of "
+ "viscous layers on adjacent edges");
+ }
+ prevHyp = hyp;
+ }
+ }
+ }
+ else if ( _hyps.size() == 1 )
+ {
+ _ignoreShapeIds.swap( ignoreEdgesOfHyp[0].first );
+ }
+
+ // check all EDGEs of the _face to fill _ignoreShapeIds and _noShrinkVert
+
+ int totalNbEdges = 0;