Salome HOME
#19887 [CEA] Body fitting missing some faces and generates not-wanted splitted elements
[modules/smesh.git] / src / StdMeshers / StdMeshers_FaceSide.cxx
index b0d36a59ccb5bd25c9f7aa58a6a9006e4b6e2605..da593c9c364ccf4431173d699bb6b0f62c8ada33 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  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
 #include "SMESHDS_Mesh.hxx"
 #include "SMESHDS_SubMesh.hxx"
 #include "SMESH_Algo.hxx"
+#include "SMESH_Block.hxx"
+#include "SMESH_ComputeError.hxx"
 #include "SMESH_Mesh.hxx"
+#include "SMESH_MeshEditor.hxx"
 #include "SMESH_MesherHelper.hxx"
-#include "SMESH_ComputeError.hxx"
-#include "SMESH_Block.hxx"
 
 #include <Adaptor2d_Curve2d.hxx>
 #include <BRepAdaptor_CompCurve.hxx>
@@ -449,6 +450,7 @@ const std::vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXCons
         for ( size_t j = 0; j < u2nodeVec.size(); ++j )
           u2node.insert( u2node.end(), u2nodeVec[j] );
       }
+      continue;
     } // loop on myEdge's
 
     // Add 2nd VERTEX node for a last EDGE
@@ -549,8 +551,7 @@ const std::vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXCons
           uvPt.normParam  = u_node->first;
           uvPt.x = uvPt.y = uvPt.normParam;
           // -- U ----------------------------------------------
-          const SMDS_EdgePosition* epos =
-            dynamic_cast<const SMDS_EdgePosition*>(uvPt.node->GetPosition());
+          SMDS_EdgePositionPtr epos = uvPt.node->GetPosition();
           if ( epos && uvPt.node->getshapeId() == myEdgeID[iE] ) {
             uvPt.param = epos->GetUParameter();
           }
@@ -665,7 +666,7 @@ std::vector<const SMDS_MeshNode*> StdMeshers_FaceSide::GetOrderedNodes(int theEd
       iE   = theEdgeInd % NbEdges();
       iEnd = iE + 1;
     }
-    for ( iE = 0; iE < iEnd; ++iE )
+    for ( ; iE < iEnd; ++iE )
     {
       double prevNormPar = ( iE == 0 ? 0 : myNormPar[ iE-1 ]); // normalized param