X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_Block.cxx;h=5ff01e3ab01843f9f18fe9cbbd6efaa6da50e662;hp=986d55aeae2d1a6a666eb9710c0e1684b898ae07;hb=a5ebdbe87e2c7f21e10a0db66022e6ca0f9ad1c5;hpb=7eda9ca931ed2a11cb5e4637e4ffe19f5c061115 diff --git a/src/SMESHUtils/SMESH_Block.cxx b/src/SMESHUtils/SMESH_Block.cxx index 986d55aea..5ff01e3ab 100644 --- a/src/SMESHUtils/SMESH_Block.cxx +++ b/src/SMESHUtils/SMESH_Block.cxx @@ -720,7 +720,7 @@ bool SMESH_Block::ComputeParameters(const gp_Pnt& thePoint, const bool isOnFace = IsFaceID( theShapeID ); double * coef = GetShapeCoef( theShapeID ); - // Find the first guess paremeters + // Find the first guess parameters gp_XYZ start(0, 0, 0); @@ -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; @@ -1028,7 +1029,7 @@ bool SMESH_Block::findUVByHalfDivision( const gp_Pnt& thePoint, dy *= 1.2; xSol = 0.5 * (xMax + xMin) ; ySol = 0.5 * (yMax + yMin) ; - if ( xMin == 0. && yMin == 0. && xMax == 1. && yMax == 1. ) // avoid infinit loop + if ( xMin == 0. && yMin == 0. && xMax == 1. && yMax == 1. ) // avoid infinite loop { #ifdef _DEBUG_REFINE_ cout << "SMESH_Block::refineParametersOnFace(): tface.IsUVInQuad() fails" << endl; @@ -1113,7 +1114,7 @@ bool SMESH_Block::findUVByHalfDivision( const gp_Pnt& thePoint, if ( saveBetterSolution( sol, theParams, thePoint.SquareDistance( tface.Point( sol )))) { #ifdef _DEBUG_REFINE_ - cout << "SMESH_Block::refineParametersOnFace(): dividing suceeded" << endl; + cout << "SMESH_Block::refineParametersOnFace(): dividing succeeded" << endl; cout << " nbGetUV = " << nbGetUV << endl; #endif return true; @@ -1584,7 +1585,7 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face& theFace, } //================================================================================ /*! - * \brief Call it after geometry initialisation + * \brief Call it after geometry initialization */ //================================================================================ @@ -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