X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_FaceSide.cxx;h=ab76ddf93fa97d8fbfcfff6332563dbd6ee56176;hp=5882b13af7828bf2475758e991d24dec513e5728;hb=bc95c31002da130977f9cdbb0a5482741c529104;hpb=21ea791049211d08356651965878a227b739c2ce diff --git a/src/StdMeshers/StdMeshers_FaceSide.cxx b/src/StdMeshers/StdMeshers_FaceSide.cxx index 5882b13af..ab76ddf93 100644 --- a/src/StdMeshers/StdMeshers_FaceSide.cxx +++ b/src/StdMeshers/StdMeshers_FaceSide.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 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 @@ -56,6 +56,8 @@ #include "utilities.h" +using namespace std; + //================================================================================ /*! * \brief Constructor of a side of one edge @@ -71,7 +73,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, const bool theIgnoreMediumNodes, SMESH_ProxyMesh::Ptr theProxyMesh) { - list edges(1,theEdge); + std::list edges(1,theEdge); *this = StdMeshers_FaceSide( theFace, edges, theMesh, theIsForward, theIgnoreMediumNodes, theProxyMesh ); } @@ -82,12 +84,12 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, */ //================================================================================ -StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, - list& theEdges, - SMESH_Mesh* theMesh, - const bool theIsForward, - const bool theIgnoreMediumNodes, - SMESH_ProxyMesh::Ptr theProxyMesh) +StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, + std::list& theEdges, + SMESH_Mesh* theMesh, + const bool theIsForward, + const bool theIgnoreMediumNodes, + SMESH_ProxyMesh::Ptr theProxyMesh) { int nbEdges = theEdges.size(); myEdge.resize ( nbEdges ); @@ -112,7 +114,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS(); int nbDegen = 0; - list::iterator edge = theEdges.begin(); + std::list::iterator edge = theEdges.begin(); for ( int index = 0; edge != theEdges.end(); ++index, ++edge ) { int i = theIsForward ? index : nbEdges-index-1; @@ -142,7 +144,6 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, double p4 = myFirst[i]+(myLast[i]-myFirst[i])/4.; double d2 = GCPnts_AbscissaPoint::Length( A2dC, myFirst[i], p2 ); double d4 = GCPnts_AbscissaPoint::Length( A2dC, myFirst[i], p4 ); - //cout<<"len = "<& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst, // set if ( isXConst ) - for ( iPt = 0; iPt < points.size(); ++iPt ) points[ iPt ].x = constValue; + for ( iPt = 0; iPt < (int)points.size(); ++iPt ) points[ iPt ].x = constValue; else - for ( iPt = 0; iPt < points.size(); ++iPt ) points[ iPt ].y = constValue; + for ( iPt = 0; iPt < (int)points.size(); ++iPt ) points[ iPt ].y = constValue; } // if ( myPoints.empty()) @@ -543,7 +557,7 @@ const vector& StdMeshers_FaceSide::SimulateUVPtStruct(int nbSeg, int EdgeIndex = 0; double prevNormPar = 0, paramSize = myNormPar[ EdgeIndex ]; - for (int i = 0 ; i < myFalsePoints.size(); ++i ) { + for ( size_t i = 0 ; i < myFalsePoints.size(); ++i ) { double normPar = double(i) / double(nbSeg); UVPtStruct & uvPt = (*points)[i]; uvPt.node = 0; @@ -582,7 +596,7 @@ std::vector StdMeshers_FaceSide::GetOrderedNodes(int theEd { if ( NbEdges() == 0 ) return resultNodes; - SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS(); + //SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS(); SMESH_MesherHelper eHelper( *myProxyMesh->GetMesh() ); SMESH_MesherHelper fHelper( *myProxyMesh->GetMesh() ); fHelper.SetSubShape( myFace ); @@ -682,8 +696,8 @@ std::vector StdMeshers_FaceSide::GetOrderedNodes(int theEd // Fill the result vector if ( theEdgeInd < 0 && - u2node.size() != myNbPonits && - u2node.size() != NbPoints( /*update=*/true )) + (int) u2node.size() != myNbPonits && + (int) u2node.size() != NbPoints( /*update=*/true )) { u2node.clear(); } @@ -810,7 +824,7 @@ const SMDS_MeshNode* StdMeshers_FaceSide::VertexNode(std::size_t i, bool* isMove n = SMESH_Algo::VertexNode( V, sm, myProxyMesh->GetMesh(), /*checkV=*/false ); if (( !n ) && - (( i > 0 && i < NbEdges() ) || IsClosed() )) + (( i > 0 && (int) i < NbEdges() ) || IsClosed() )) { iE = SMESH_MesherHelper::WrapIndex( int(i)-1, NbEdges() ); sm = myProxyMesh->GetMeshDS()->MeshElements( myEdgeID[ iE ]); @@ -1051,7 +1065,7 @@ void StdMeshers_FaceSide::dump(const char* msg) const if (msg) MESSAGE ( std::endl << msg ); MESSAGE_BEGIN ("NB EDGES: "<< myEdge.size() ); MESSAGE_ADD ( "nbPoints: "<()<() - << " V2: " << TopExp::LastVertex( myEdge[i], 1).TShape().operator->() ); + << " V2: " << TopExp::LastVertex( myEdge[i], 1).TShape().operator->() ); } MESSAGE_ADD ( "\tC2d: "); - + if (myC2d[i].IsNull()) { MESSAGE_ADD ( "NULL" ); } else { MESSAGE_ADD ( myC2d[i].operator->() ); } - + MESSAGE_ADD ( "\tF: "< 0 && myPoints[ i ].normParam > U ) --i; - while ( i+1 < myPoints.size() && myPoints[ i+1 ].normParam < U ) + while ( i+1 < (int)myPoints.size() && myPoints[ i+1 ].normParam < U ) ++i; double r = (( U - myPoints[ i ].normParam ) / ( myPoints[ i+1 ].normParam - myPoints[ i ].normParam ));