Salome HOME
Fix regression of Extrusion 3D caused by OCCT changes
[modules/smesh.git] / src / StdMeshers / StdMeshers_FaceSide.cxx
index b0d36a59ccb5bd25c9f7aa58a6a9006e4b6e2605..6c6d4c2bedea7e66064297b9546acd6899b052b4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019  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>
@@ -549,8 +550,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 +665,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