Salome HOME
0020832: EDF 1359 SMESH : Automatic meshing of boundary layers
authoreap <eap@opencascade.com>
Tue, 18 Jan 2011 12:17:14 +0000 (12:17 +0000)
committereap <eap@opencascade.com>
Tue, 18 Jan 2011 12:17:14 +0000 (12:17 +0000)
 Move IsClosedEdge() to SMESH_MesherHelper from StdMeshers_ProjectionUtils

src/StdMeshers/StdMeshers_Prism_3D.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.hxx

index 5a2a1a3fee22225c205d54bd223ca48199075ad9..90c68771b2f0f737d30556c20e32268d1975fbf5 100644 (file)
@@ -1724,7 +1724,7 @@ bool StdMeshers_PrismAsBlock::IsForwardEdge(SMESHDS_Mesh*           meshDS,
                                             const int               sideFaceID)
 {
   bool isForward = false;
-  if ( TAssocTool::IsClosedEdge( bottomEdge ))
+  if ( SMESH_MesherHelper::IsClosedEdge( bottomEdge ))
   {
     isForward = ( bottomEdge.Orientation() == TopAbs_FORWARD );
   }
index 7749da81cde82538d63d274f4a758802cdc149d3..02b732c0b535d58d2d2bfde73c42d1b309621129 100644 (file)
@@ -936,7 +936,8 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
         return true; // done
       }
     }
-    if ( IsClosedEdge( edge1 ) && IsClosedEdge( edge2 ))
+    if ( SMESH_MesherHelper::IsClosedEdge( edge1 ) &&
+         SMESH_MesherHelper::IsClosedEdge( edge2 ))
     {
       // TODO: find out a proper orientation (is it possible?)
       InsertAssociation( edge1, edge2, theMap, bidirect); // insert with a proper orientation
@@ -1151,7 +1152,7 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
       edge.Nullify();
       TopoDS_Shape wire = OuterShape( TopoDS::Face( expF.Current() ), TopAbs_WIRE );
       for ( expE.Init( wire, TopAbs_EDGE ); edge.IsNull() && expE.More(); expE.Next() )
-        if ( !IsClosedEdge( TopoDS::Edge( expE.Current() )))
+        if ( !SMESH_MesherHelper::IsClosedEdge( TopoDS::Edge( expE.Current() )))
           edge = expE.Current();
       if ( !edge.IsNull() )
         break;
@@ -1159,7 +1160,7 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
   } else if (edge.ShapeType() != TopAbs_EDGE) { // no faces
     edge.Nullify();
     for ( expE.Init( theShape1, TopAbs_EDGE ); edge.IsNull() && expE.More(); expE.Next() )
-      if ( !IsClosedEdge( TopoDS::Edge( expE.Current() )))
+      if ( !SMESH_MesherHelper::IsClosedEdge( TopoDS::Edge( expE.Current() )))
         edge = expE.Current();
   }
   if ( edge.IsNull() || edge.ShapeType() != TopAbs_EDGE )
@@ -1691,7 +1692,7 @@ FindMatchingNodesOnFaces( const TopoDS_Face&     face1,
   if ( hasNodesOnEdge )
   {
     int nbNodeToGet = 1;
-    if ( IsClosedEdge( edge1 ) || IsClosedEdge( edge2 ) )
+    if ( helper1.IsClosedEdge( edge1 ) || helper2.IsClosedEdge( edge2 ) )
       nbNodeToGet = 2;
     for ( int is2 = 0; is2 < 2; ++is2 )
     {
@@ -1899,19 +1900,6 @@ FindMatchingNodesOnFaces( const TopoDS_Face&     face1,
   return true;
 }
 
-//================================================================================
-/*!
- * \brief Check if the first and last vertices of an edge are the same
- * \param anEdge - the edge to check
- * \retval bool - true if same
- */
-//================================================================================
-
-bool StdMeshers_ProjectionUtils::IsClosedEdge( const TopoDS_Edge& anEdge )
-{
-  return TopExp::FirstVertex( anEdge ).IsSame( TopExp::LastVertex( anEdge ));
-}
-
 //================================================================================
   /*!
    * \brief Return any subshape of a face belonging to the outer wire
index 6a657e55d6ba481e0e5e234db783c9047df3fcda..9f53caf243c1dedafd08bebf5136f5c73e349a7b 100644 (file)
@@ -158,13 +158,6 @@ class StdMeshers_ProjectionUtils
                                         SMESH_Mesh*            mesh2,
                                         const TShapeShapeMap & assocMap,
                                         TNodeNodeMap &         nodeIn2OutMap);
-  /*!
-   * \brief Check if the first and last vertices of an edge are the same
-    * \param anEdge - the edge to check
-    * \retval bool - true if same
-   */
-  static bool IsClosedEdge( const TopoDS_Edge& anEdge );
-
   /*!
    * \brief Return any subshape of a face belonging to the outer wire
     * \param face - the face