X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_Block.cxx;h=4e6229c305e84adf37ef7267e3a9f0d64f75d6fc;hp=b87928995d638f8bed1cdc61e8381c557b7cf492;hb=f08f994ee33e3b9cd4a78d2682788ce4329368fc;hpb=21ea791049211d08356651965878a227b739c2ce diff --git a/src/SMESHUtils/SMESH_Block.cxx b/src/SMESHUtils/SMESH_Block.cxx index b87928995..4e6229c30 100644 --- a/src/SMESHUtils/SMESH_Block.cxx +++ b/src/SMESHUtils/SMESH_Block.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 @@ -166,7 +166,7 @@ void SMESH_Block::TFace::Set( const int faceID, // pcurves vector< int > edgeIdVec; GetFaceEdgesIDs( faceID, edgeIdVec ); - for ( int iE = 0; iE < edgeIdVec.size(); iE++ ) // loop on 4 edges + for ( size_t iE = 0; iE < edgeIdVec.size(); iE++ ) // loop on 4 edges { myCoordInd[ iE ] = GetCoordIndOnEdge( edgeIdVec[ iE ] ); if ( myC2d[ iE ]) delete myC2d[ iE ]; @@ -930,6 +930,7 @@ void SMESH_Block::refineParametersOnFace( const gp_Pnt& thePoint, { // find UV of thePoint on the FACE Standard_Real U,V; + U=V=0; const TFace& tface = myFace[ theFaceID - ID_FirstF ]; if ( !tface.Surface() ) return; @@ -1607,7 +1608,6 @@ bool SMESH_Block::LoadMeshBlock(const SMDS_MeshVolume* theVolume, const int theNode001Index, vector& theOrderedNodes) { - MESSAGE(" ::LoadMeshBlock()"); init(); SMDS_VolumeTool vTool; @@ -1735,7 +1735,6 @@ bool SMESH_Block::LoadBlockShapes(const TopoDS_Shell& theShell, const TopoDS_Vertex& theVertex001, TopTools_IndexedMapOfOrientedShape& theShapeIDMap ) { - MESSAGE(" ::LoadBlockShapes()"); return ( FindBlockShapes( theShell, theVertex000, theVertex001, theShapeIDMap ) && LoadBlockShapes( theShapeIDMap )); } @@ -1751,8 +1750,6 @@ bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell, const TopoDS_Vertex& theVertex001, TopTools_IndexedMapOfOrientedShape& theShapeIDMap ) { - MESSAGE(" ::FindBlockShapes()"); - // 8 vertices TopoDS_Shape V000, V100, V010, V110, V001, V101, V011, V111; // 12 edges @@ -1778,7 +1775,7 @@ bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell, if ( V000.IsNull() ) { // find vertex 000 - the one with smallest coordinates - double minVal = DBL_MAX, minX, val; + double minVal = DBL_MAX, minX = DBL_MAX, val; for ( int i = 1; i <= 8; i++ ) { const TopoDS_Vertex& v = TopoDS::Vertex( vfMap.FindKey( i )); gp_Pnt P = BRep_Tool::Pnt( v ); @@ -1822,7 +1819,7 @@ bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell, return false; } TopTools_ListIteratorOfListOfShape f001It, f000It ( f000List ); - int i, j, iFound1, iFound2; + int i, j, iFound1=0, iFound2=0; for ( j = 0; f000It.More(); f000It.Next(), j++ ) { if ( NB_FACES_BY_VERTEX == 6 && j % 2 ) continue; // each face encounters twice @@ -2083,7 +2080,7 @@ bool SMESH_Block::LoadFace(const TopoDS_Face& theFace, bool isForward[4]; vector< int > edgeIdVec; GetFaceEdgesIDs( theFaceID, edgeIdVec ); - for ( int iE = 0; iE < edgeIdVec.size(); iE++ ) // loop on 4 edges + for ( size_t iE = 0; iE < edgeIdVec.size(); iE++ ) // loop on 4 edges { if ( edgeIdVec[ iE ] > theShapeIDMap.Extent() ) return false;