Salome HOME
Merge branch 'master' into gni/evolution
[modules/smesh.git] / src / SMESHUtils / SMESH_Offset.cxx
index 9ad02dd2b3f34c9b5ed0b209b7dbd69d59499e23..01552f584133ff96cdb6ef46c86efeef87183d24 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -552,7 +552,7 @@ namespace
 
   bool getTranslatedPosition( const SMDS_MeshNode*         theNewNode,
                               const double                 theOffset,
-                              const double                 theTol,
+                              const double                 /*theTol*/,
                               const double                 theSign,
                               const std::vector< gp_XYZ >& theFaceNormals,
                               SMDS_Mesh&                   theSrcMesh,
@@ -2022,6 +2022,8 @@ namespace SMESH_MeshAlgos
 #ifdef _DEBUG_
             std::cerr << "BAD tria" << std::endl;
             cf.Dump();
+#else
+            if ( i < 0 ) cf.Dump(); // avoid "CutFace::Dump() unused in release mode"
 #endif
             continue;
           }
@@ -2497,7 +2499,7 @@ namespace
    */
   //================================================================================
 
-  void CutFace::AddPoint( const CutLink& p1, const CutLink& p2, double tol ) const
+  void CutFace::AddPoint( const CutLink& p1, const CutLink& p2, double /*tol*/ ) const
   {
     if ( myInitFace->GetNodeIndex( p1.IntNode() ) >= 0 ||
          myInitFace->GetNodeIndex( p2.IntNode() ) >= 0 )
@@ -2756,7 +2758,7 @@ namespace
       // add links connecting internal loops with the boundary ones
 
       // find a pair of closest nodes
-      const SMDS_MeshNode *closestNode1, *closestNode2;
+      const SMDS_MeshNode *closestNode1 = 0, *closestNode2 = 0;
       double minDist = 1e100;
       for ( size_t iE = 0; iE < loop.myLinks.size(); ++iE )
       {
@@ -2918,7 +2920,7 @@ namespace
                              const double                 theSign,
                              const std::vector< gp_XYZ >& theNormals,
                              std::vector< EdgePart >&     theCutOffLinks,
-                             TLinkMap&                    theCutOffCoplanarLinks) const
+                             TLinkMap&                    /*theCutOffCoplanarLinks*/) const
   {
     EdgePart sideEdge;
     boost::container::flat_set< const SMDS_MeshElement* > checkedCoplanar;
@@ -2981,8 +2983,8 @@ namespace
             bool isAdded = checkedCoplanar.insert( myLinks[iE].myFace ).second;
             if ( !isAdded )
               continue;
-            toErase = SMESH_MeshAlgos::GetCommonNodes( myLinks[i ].myFace,
-                                                       myLinks[iE].myFace ).size() < 1;
+            toErase = ( SMESH_MeshAlgos::NbCommonNodes( myLinks[i ].myFace,
+                                                        myLinks[iE].myFace ) < 1 );
           }
         }
       }
@@ -3075,7 +3077,7 @@ namespace
       //check if the faces are connected
       int nbCommonNodes = 0;
       if ( e.myFace && myFace )
-        nbCommonNodes = SMESH_MeshAlgos::GetCommonNodes( e.myFace, myFace ).size();
+        nbCommonNodes = SMESH_MeshAlgos::NbCommonNodes( e.myFace, myFace );
       bool toReplace = (( myIndex == _INTERNAL && nbCommonNodes > 1 ) ||
                         ( myIndex == _COPLANAR && nbCommonNodes < 2 ));
       if ( toReplace )