+ //================================================================================
+ /*!
+ * \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 nbToEdgesIgnore = 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] );
+ ++nbToEdgesIgnore;
+ }
+ }
+ }
+ else // EDGEs to make the Viscous Layers on are given
+ {
+ TopExp_Explorer E( theFace, TopAbs_EDGE );
+ for ( ; E.More(); E.Next(), ++nbToEdgesIgnore )
+ theEdgeIds.insert( theMesh->ShapeToIndex( E.Current() ));
+
+ for ( size_t i = 0; i < ids.size(); ++i )
+ nbToEdgesIgnore -= theEdgeIds.erase( ids[i] );
+ }
+ return nbToEdgesIgnore;
+ }
+