X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Projection_2D.cxx;h=4ef3b3f671d6ed10964de5512a9f23231ff6bfe3;hb=7d57cfe3069f0be65c6773ff704c2642129b2bb8;hp=0686b165a77c6301498028dd42455674b24afa52;hpb=04f997252152407f9180e03f0af428ab2ca6f4be;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Projection_2D.cxx b/src/StdMeshers/StdMeshers_Projection_2D.cxx index 0686b165a..4ef3b3f67 100644 --- a/src/StdMeshers/StdMeshers_Projection_2D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_2D.cxx @@ -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 @@ -42,6 +42,7 @@ #include "SMESH_Gen.hxx" #include "SMESH_Mesh.hxx" #include "SMESH_MeshAlgos.hxx" +#include "SMESH_MeshEditor.hxx" #include "SMESH_MesherHelper.hxx" #include "SMESH_Pattern.hxx" #include "SMESH_subMesh.hxx" @@ -85,8 +86,8 @@ namespace TAssocTool = StdMeshers_ProjectionUtils; //purpose : //======================================================================= -StdMeshers_Projection_2D::StdMeshers_Projection_2D(int hypId, int studyId, SMESH_Gen* gen) - :SMESH_2D_Algo(hypId, studyId, gen) +StdMeshers_Projection_2D::StdMeshers_Projection_2D(int hypId, SMESH_Gen* gen) + :SMESH_2D_Algo(hypId, gen) { _name = "Projection_2D"; _compatibleHypothesis.push_back("ProjectionSource2D"); @@ -277,7 +278,7 @@ namespace { //================================================================================ bool getBoundaryNodes ( SMESH_subMesh* sm, - const TopoDS_Face& face, + const TopoDS_Face& /*face*/, map< double, const SMDS_MeshNode* > & u2nodes, set< const SMDS_MeshNode* > & seamNodes) { @@ -371,8 +372,7 @@ namespace { if ( node->GetPosition()->GetTypeOfPosition() != SMDS_TOP_EDGE ) RETURN_BAD_RESULT("Bad node position type: node " << node->GetID() << " pos type " << node->GetPosition()->GetTypeOfPosition()); - const SMDS_EdgePosition* pos = - static_cast(node->GetPosition()); + SMDS_EdgePositionPtr pos = node->GetPosition(); u2nodes.insert( make_pair( pos->GetUParameter(), node )); seamNodes.insert( node ); } @@ -975,13 +975,13 @@ namespace { */ //================================================================================ - bool projectQuads(const TopoDS_Face& tgtFace, - const TopoDS_Face& srcFace, - const TSideVector& tgtWires, - const TSideVector& srcWires, - const TAssocTool::TShapeShapeMap& shape2ShapeMap, - TAssocTool::TNodeNodeMap& src2tgtNodes, - const bool is1DComputed) + bool projectQuads(const TopoDS_Face& /*tgtFace*/, + const TopoDS_Face& /*srcFace*/, + const TSideVector& /*tgtWires*/, + const TSideVector& /*srcWires*/, + const TAssocTool::TShapeShapeMap& /*shape2ShapeMap*/, + TAssocTool::TNodeNodeMap& /*src2tgtNodes*/, + const bool /*is1DComputed*/) { // SMESH_Mesh * tgtMesh = tgtWires[0]->GetMesh(); // SMESH_Mesh * srcMesh = srcWires[0]->GetMesh(); @@ -1562,7 +1562,9 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& // mapper changed, no more "mapper puts on a seam edge nodes from 2 edges" if ( isSeam && ! getBoundaryNodes ( sm, tgtFace, u2nodesOnSeam, seamNodes )) - ;//RETURN_BAD_RESULT("getBoundaryNodes() failed"); + { + //RETURN_BAD_RESULT("getBoundaryNodes() failed"); + } SMDS_NodeIteratorPtr nIt = smDS->GetNodes(); while ( nIt->more() ) @@ -1587,8 +1589,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& break; } case SMDS_TOP_EDGE: { - const SMDS_EdgePosition* pos = - static_cast(node->GetPosition()); + SMDS_EdgePositionPtr pos = node->GetPosition(); pos2nodes.insert( make_pair( pos->GetUParameter(), node )); break; } @@ -1695,7 +1696,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& if ( !projDone || is1DComputed ) // ---------------------------------------------------------------- // The mapper can create distorted faces by placing nodes out of the FACE - // boundary, also bad face can be created if EDGEs already discretized + // boundary, also bad faces can be created if EDGEs already discretized // --> fix bad faces by smoothing // ---------------------------------------------------------------- if ( helper.IsDistorted2D( tgtSubMesh, /*checkUV=*/false, &helper ))