From: eap Date: Tue, 24 May 2016 17:37:08 +0000 (+0300) Subject: Minor DOC changes X-Git-Tag: V7_8_0rc2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=373690534aa482a4daea68f2a5a14fa9de8a9a1b Minor DOC changes + Fix compilation warning "variable may be used uninitialized" --- diff --git a/doc/salome/examples/filters_ex01.py b/doc/salome/examples/filters_ex01.py index 7de1cd33a..812e94288 100644 --- a/doc/salome/examples/filters_ex01.py +++ b/doc/salome/examples/filters_ex01.py @@ -38,3 +38,7 @@ print "MESH: Min aspect = %s, Max aspect = %s" % ( aspects[0], aspects[1] ) # get max value of Aspect Ratio of faces in triaGroup grAspects = mesh.GetMinMax( SMESH.FT_AspectRatio, triaGroup ) print "GROUP: Max aspect = %s" % grAspects[1] + +# get Aspect Ratio of an element +aspect = mesh.FunctorValue( SMESH.FT_AspectRatio, ids[0] ) +print "Aspect ratio of the face %s = %s" % ( ids[0], aspect ) diff --git a/doc/salome/examples/grouping_elements_ex01.py b/doc/salome/examples/grouping_elements_ex01.py index 9181e43df..4016a8359 100644 --- a/doc/salome/examples/grouping_elements_ex01.py +++ b/doc/salome/examples/grouping_elements_ex01.py @@ -40,7 +40,7 @@ print "size", aGroup.Size() print "is empty", aGroup.IsEmpty() # check of presence of an entity in the group -aGroup.Add([1,2]) # method specific to the standalone group +aGroup.Add([1,2]) # Add() method is specific to the standalone group print "contains node 2", aGroup.Contains(2) # get an entity by index diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index e4efffe41..f14444d58 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -1869,7 +1869,7 @@ void Length2D::GetValues(TValues& theValues) } else { SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator(); - long aNodeId[2]; + long aNodeId[2] = {0,0}; gp_Pnt P[3]; double aLength; diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index f38622a34..c317869bc 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -660,7 +660,7 @@ bool SMESH_Pattern::Load (SMESH_Mesh* theMesh, const TopoDS_Vertex v = TopoDS::Vertex( vExp.Current() ); gp_Pnt2d uv = BRep_Tool::Parameters( v, face ); double minDist = DBL_MAX; - int index; + int index = 0; vector< TPoint >::const_iterator pVecIt = myPoints.begin(); for ( iPoint = 0; pVecIt != myPoints.end(); pVecIt++, iPoint++ ) { double dist = uv.SquareDistance( (*pVecIt).myInitUV ); diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 33472f937..b6c534369 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -2726,7 +2726,7 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI } else { - HypothesisData* anCurrentAlgo; + HypothesisData* anCurrentAlgo = 0; bool isReqDisBound = true; QString anCurrentCompareType = anCompareType; isNone = currentHyp( aDim, Algo ) < 0; diff --git a/src/StdMeshers/StdMeshers_Penta_3D.cxx b/src/StdMeshers/StdMeshers_Penta_3D.cxx index 8a852edb9..6b4ca9b05 100644 --- a/src/StdMeshers/StdMeshers_Penta_3D.cxx +++ b/src/StdMeshers/StdMeshers_Penta_3D.cxx @@ -360,7 +360,7 @@ void StdMeshers_Penta_3D::MakeNodes() // set XYZ on horizontal edges and get node columns of faces: // 2 columns for each face, between which a base node is located vector* nColumns[8]; - double ratio[ NB_WALL_FACES ]; // base node position between columns [0.-1.] + double ratio[ NB_WALL_FACES ] = {0,0,0,0}; // base node position between columns [0.-1.] if ( createNode ) { for ( k = 0; k < NB_WALL_FACES ; ++k ) { ratio[ k ] = SetHorizEdgeXYZ (aBNXYZ, wallFaceID[ k ], diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index 955fc1147..e9e6ad827 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -3300,7 +3300,7 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh & aMesh, UVPtStruct nullUVPtStruct; nullUVPtStruct.node = 0; - nullUVPtStruct.x = nullUVPtStruct.y = nullUVPtStruct.u = nullUVPtStruct.y = 0; + nullUVPtStruct.x = nullUVPtStruct.y = nullUVPtStruct.u = nullUVPtStruct.v = 0; nullUVPtStruct.param = 0; diff --git a/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx b/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx index 4e78b7157..d5b758bda 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx @@ -300,7 +300,7 @@ namespace VISCOUS_2D double _D; // _vec1.Crossed( _vec2 ) double _param1, _param2; // intersection param on _seg1 and _seg2 - _SegmentIntersection(): _param1(0), _param2(0), _D(0) {} + _SegmentIntersection(): _D(0), _param1(0), _param2(0) {} bool Compute(const _Segment& seg1, const _Segment& seg2, bool seg2IsRay = false ) {