Salome HOME
Minor DOC changes
authoreap <eap@opencascade.com>
Tue, 24 May 2016 17:37:08 +0000 (20:37 +0300)
committereap <eap@opencascade.com>
Tue, 24 May 2016 17:37:08 +0000 (20:37 +0300)
+ Fix compilation warning "variable may be used uninitialized"

doc/salome/examples/filters_ex01.py
doc/salome/examples/grouping_elements_ex01.py
src/Controls/SMESH_Controls.cxx
src/SMESH/SMESH_Pattern.cxx
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/StdMeshers/StdMeshers_Penta_3D.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_ViscousLayers2D.cxx

index 7de1cd33addd6c138fb1a2d1abced051f20de470..812e9428878883a49f86ffef2189c7bc7c2d6cc5 100644 (file)
@@ -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 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 )
index 9181e43dfb8f94fb473a81f69ea726ee1133b292..4016a8359650805d5c358495a735012b7a4fbe27 100644 (file)
@@ -40,7 +40,7 @@ print "size", aGroup.Size()
 print "is empty", aGroup.IsEmpty()
 
 # check of presence of an entity in the group
 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
 print "contains node 2", aGroup.Contains(2)
 
 # get an entity by index
index e4efffe41c6dadb48bb69d664735b293289f60ee..f14444d584f6a17876718736f419a15495c6a433 100644 (file)
@@ -1869,7 +1869,7 @@ void Length2D::GetValues(TValues& theValues)
     }
     else {
       SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
     }
     else {
       SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
-      long aNodeId[2];
+      long aNodeId[2] = {0,0};
       gp_Pnt P[3];
 
       double aLength;
       gp_Pnt P[3];
 
       double aLength;
index f38622a34e046e9a36e9b9d507179c36a702acca..c317869bc546c079aec808ccd951790a3d054784 100644 (file)
@@ -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;
       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 );
       vector< TPoint >::const_iterator pVecIt = myPoints.begin();
       for ( iPoint = 0; pVecIt != myPoints.end(); pVecIt++, iPoint++ ) {
         double dist = uv.SquareDistance( (*pVecIt).myInitUV );
index 33472f9376b1a90d751693c1ae75e9ec3431236a..b6c53436919659381b67d54b348281e1d3c4cec3 100644 (file)
@@ -2726,7 +2726,7 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI
   }
   else
   {
   }
   else
   {
-    HypothesisData* anCurrentAlgo;
+    HypothesisData* anCurrentAlgo = 0;
     bool isReqDisBound = true;
     QString anCurrentCompareType = anCompareType;
     isNone = currentHyp( aDim, Algo ) < 0;
     bool isReqDisBound = true;
     QString anCurrentCompareType = anCompareType;
     isNone = currentHyp( aDim, Algo ) < 0;
index 8a852edb9af21ab99a2ccf99c84e66e8353cee4a..6b4ca9b05e642344835405813495ef71e8ed17bb 100644 (file)
@@ -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<const SMDS_MeshNode*>* nColumns[8];
     // set XYZ on horizontal edges and get node columns of faces:
     // 2 columns for each face, between which a base node is located
     vector<const SMDS_MeshNode*>* 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 ],
     if ( createNode ) {
       for ( k = 0; k < NB_WALL_FACES ; ++k ) {
         ratio[ k ] = SetHorizEdgeXYZ (aBNXYZ, wallFaceID[ k ],
index 955fc11473dab13d350b0d50d1efa403ef267674..e9e6ad82744158deec6e4d168e76324b3eb57343 100644 (file)
@@ -3300,7 +3300,7 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh &        aMesh,
 
     UVPtStruct nullUVPtStruct;
     nullUVPtStruct.node = 0;
 
     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;
     
 
     nullUVPtStruct.param = 0;
     
 
index 4e78b7157b52a5b3eb869b48ef60cdee994ae9f3..d5b758bda8c4f1e4f4341ad2156e46fd00aa4550 100644 (file)
@@ -300,7 +300,7 @@ namespace VISCOUS_2D
     double   _D;               // _vec1.Crossed( _vec2 )
     double   _param1, _param2; // intersection param on _seg1 and _seg2
 
     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 )
     {
 
     bool Compute(const _Segment& seg1, const _Segment& seg2, bool seg2IsRay = false )
     {