+ list< const SMESHDS_Hypothesis * > hypList;
+ list< TopoDS_Shape > hypShapes;
+ int nbHyps = theMesh.GetHypotheses
+ ( theFace, hypFilter, hypList, /*ancestors=*/true, &hypShapes );
+ if ( nbHyps )
+ {
+ theHyps.reserve( nbHyps );
+ theAssignedTo.reserve( nbHyps );
+ list< const SMESHDS_Hypothesis * >::iterator hyp = hypList.begin();
+ list< TopoDS_Shape >::iterator shape = hypShapes.begin();
+ for ( ; hyp != hypList.end(); ++hyp, ++shape )
+ {
+ theHyps.push_back( static_cast< const StdMeshers_ViscousLayers2D* > ( *hyp ));
+ theAssignedTo.push_back( *shape );
+ }
+ }
+ return nbHyps;
+ }
+
+ //================================================================================
+ /*!
+ * \brief Returns ids of EDGEs not to create Viscous Layers on
+ * \param [in] theHyp - the hypothesis, holding edges either to ignore or not to.
+ * \param [in] theFace - the FACE whose EDGEs are checked.
+ * \param [in] theMesh - the mesh.
+ * \param [in,out] theEdgeIds - container returning EDGEs to ignore.
+ * \return int - number of found EDGEs of the FACE.
+ */
+ //================================================================================
+
+ int getEdgesToIgnore( const StdMeshers_ViscousLayers2D* theHyp,
+ const TopoDS_Shape& theFace,
+ const SMESHDS_Mesh* theMesh,
+ set< int > & theEdgeIds)
+ {
+ int nbEdgesToIgnore = 0;
+ vector<TGeomID> ids = theHyp->GetBndShapes();
+ if ( theHyp->IsToIgnoreShapes() ) // EDGEs to ignore are given
+ {
+ for ( size_t i = 0; i < ids.size(); ++i )
+ {
+ const TopoDS_Shape& E = theMesh->IndexToShape( ids[i] );
+ if ( !E.IsNull() &&
+ E.ShapeType() == TopAbs_EDGE &&
+ SMESH_MesherHelper::IsSubShape( E, theFace ))
+ {
+ theEdgeIds.insert( ids[i] );
+ ++nbEdgesToIgnore;
+ }
+ }
+ }
+ else // EDGEs to make the Viscous Layers on are given
+ {
+ TopExp_Explorer E( theFace, TopAbs_EDGE );
+ for ( ; E.More(); E.Next(), ++nbEdgesToIgnore )
+ theEdgeIds.insert( theMesh->ShapeToIndex( E.Current() ));
+
+ for ( size_t i = 0; i < ids.size(); ++i )
+ nbEdgesToIgnore -= theEdgeIds.erase( ids[i] );
+ }
+ return nbEdgesToIgnore;