]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
warnings vuzlov/20256
authoreap <eap@opencascade.com>
Wed, 17 Mar 2021 14:24:17 +0000 (17:24 +0300)
committereap <eap@opencascade.com>
Wed, 17 Mar 2021 14:24:17 +0000 (17:24 +0300)
src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.h

index e1939c93d8e913b797006ff12e96e1fceb231dd7..fa240ffa8af122f2a1f7f896c010fe0033e4d569 100644 (file)
@@ -70,29 +70,30 @@ BLSURFPlugin_Attractor::BLSURFPlugin_Attractor (const TopoDS_Face& Face, const T
   _vectU(),
   _vectV(),
   _DMap(),
-  _known(),
-  _trial(),
-  _type(0),
-  _gridU(),
-  _gridV(),
-  _u1 (0.),
-  _u2 (0.),
-  _v1 (0.),
-  _v2 (0.),
-  _startSize(-1),
-  _endSize(-1),
-  _actionRadius(-1),
-  _constantRadius(-1),
-  _isMapBuilt(false),
-  _isEmpty(false)
+    _known(),
+    _trial(),
+    _type(0),
+    _gridU(),
+    _gridV(),
+    _u1 (0.),
+    _u2 (0.),
+    _v1 (0.),
+    _v2 (0.),
+    _startSize(-1),
+    _endSize(-1),
+    _actionRadius(-1),
+    _constantRadius(-1),
+    _isMapBuilt(false),
+    _isEmpty(false)
 {
   _face = Face;
   _attractorShape = Attractor;
-  
+
   init();
 }
 
-bool BLSURFPlugin_Attractor::init(){ 
+bool BLSURFPlugin_Attractor::init()
+{
   Standard_Real u0,v0;
   int i,j,i0,j0 ;
   _known.clear();
@@ -119,7 +120,7 @@ bool BLSURFPlugin_Attractor::init(){
       return true;
     }
   }
-  
+
   // Calculation of the bounds of the face
   ShapeAnalysis::GetFaceUVBounds(_face,_u1,_u2,_v1,_v2);
 
@@ -132,7 +133,7 @@ bool BLSURFPlugin_Attractor::init(){
   for (j=0; j<=_gridV; j++){
     _vectV.push_back(_v1+j*(_v2-_v1)/_gridV) ;
   }
-  
+
   // Initialization of _DMap and _known
   std::vector<double> temp(_gridV+1,std::numeric_limits<double>::infinity());  // Set distance of all "far" points to Infinity 
   for (i=0; i<=_gridU; i++){
@@ -159,11 +160,11 @@ bool BLSURFPlugin_Attractor::init(){
     gp_Pnt P = BRep_Tool::Pnt(aVertex);
     GeomAPI_ProjectPointOnSurf projector( P, aSurf );
     projector.LowerDistanceParameters(u0,v0);
-    i0 = floor ( (u0 - _u1) * _gridU / (_u2 - _u1) + 0.5 );
-    j0 = floor ( (v0 - _v1) * _gridV / (_v2 - _v1) + 0.5 );
+    i0 = int( floor ( (u0 - _u1) * _gridU / (_u2 - _u1) + 0.5 ));
+    j0 = int( floor ( (v0 - _v1) * _gridV / (_v2 - _v1) + 0.5 ));
     TPnt[0]=0.;                                                                // Set the distance of the starting point to 0.
-    TPnt[1]=i0;
-    TPnt[2]=j0;
+    TPnt[1]=double( i0 );
+    TPnt[2]=double( j0 );
     _DMap[i0][j0] = 0.;
     _trial.insert(TPnt);                                                       // Move starting point to _trial
   }
@@ -173,7 +174,8 @@ bool BLSURFPlugin_Attractor::init(){
 
 // check that i and j are inside the bounds of the grid to avoid out of bounds errors
 // in affectation of the grid's vectors
-void BLSURFPlugin_Attractor::avoidOutOfBounds(int& i, int& j){
+void BLSURFPlugin_Attractor::avoidOutOfBounds(int& i, int& j)
+{
   if (i > _gridU)
     i = _gridU;
   if (i < 0)
@@ -184,7 +186,8 @@ void BLSURFPlugin_Attractor::avoidOutOfBounds(int& i, int& j){
     j = 0;
 }
 
-void BLSURFPlugin_Attractor::edgeInit(Handle(Geom_Surface) theSurf, const TopoDS_Edge& anEdge){
+void BLSURFPlugin_Attractor::edgeInit(Handle(Geom_Surface) theSurf, const TopoDS_Edge& anEdge)
+{
   gp_Pnt2d P2;
   double first;
   double last;
@@ -199,8 +202,8 @@ void BLSURFPlugin_Attractor::edgeInit(Handle(Geom_Surface) theSurf, const TopoDS
   int N = 1200;
   for (i=0; i<=N; i++){
     P2 = aCurve2d->Value(first + i * (last-first) / N);
-    i0 = floor( (P2.X() - _u1) * _gridU / (_u2 - _u1) + 0.5 );
-    j0 = floor( (P2.Y() - _v1) * _gridV / (_v2 - _v1) + 0.5 );
+    i0 = int(floor( (P2.X() - _u1) * _gridU / (_u2 - _u1) + 0.5 ));
+    j0 = int(floor( (P2.Y() - _v1) * _gridV / (_v2 - _v1) + 0.5 ));
 
     // Avoid out of bounds errors when the ends of the edge are outside the face
     avoidOutOfBounds(i0, j0);
@@ -214,7 +217,8 @@ void BLSURFPlugin_Attractor::edgeInit(Handle(Geom_Surface) theSurf, const TopoDS
 }  
 
 
-void BLSURFPlugin_Attractor::SetParameters(double Start_Size, double End_Size, double Action_Radius, double Constant_Radius){
+void BLSURFPlugin_Attractor::SetParameters(double Start_Size, double End_Size, double Action_Radius, double Constant_Radius)
+{
   _startSize = Start_Size;
   _endSize = End_Size;
   _actionRadius = Action_Radius;
@@ -226,11 +230,11 @@ double BLSURFPlugin_Attractor::_distanceFromPoint(double u, double v)
   return _attractorPnt.Distance( _plane->Value( u, v ));
 }
 
-double BLSURFPlugin_Attractor::_distanceFromMap(double u, double v){
-  
+double BLSURFPlugin_Attractor::_distanceFromMap(double u, double v)
+{
   //   MG-CADSurf seems to perform a linear interpolation so it's sufficient to give it a non-continuous distance map
-  int i = floor ( (u - _u1) * _gridU / (_u2 - _u1) + 0.5 );
-  int j = floor ( (v - _v1) * _gridV / (_v2 - _v1) + 0.5 );
+  int i = int(floor ( (u - _u1) * _gridU / (_u2 - _u1) + 0.5 ));
+  int j = int(floor ( (v - _v1) * _gridV / (_v2 - _v1) + 0.5 ));
   
   // Avoid out of bounds errors in _DMap
   avoidOutOfBounds(i, j);
@@ -265,10 +269,10 @@ double BLSURFPlugin_Attractor::GetSize(double u, double v)
 }
 
 
-void BLSURFPlugin_Attractor::BuildMap() { 
-  
+void BLSURFPlugin_Attractor::BuildMap()
+{
   MESSAGE("building the map");
-  int i, j, k, n;  
+  int i, j, k, n;
   //int count = 0;
   int ip, jp, kp, np;
   int i0, j0;
@@ -288,24 +292,24 @@ void BLSURFPlugin_Attractor::BuildMap() {
   // While there are points in "Trial" (representing a kind of advancing front), loop on them -----------------------------------------------------------
   while (_trial.size() > 0 ) {
     min = _trial.begin();                        // Get trial point with min distance from start
-    i0 = (*min)[1];
-    j0 = (*min)[2];
+    i0 = int( (*min)[1] );
+    j0 = int( (*min)[2] );
     // Avoid out of bounds errors in _known affectations
     avoidOutOfBounds(i0, j0);
     _known[i0][j0] = true;                       // Move it to "Known"
     _trial.erase(min);                           // Remove it from "Trial"
 
     // Loop on neighbours of the trial min --------------------------------------------------------------------------------------------------------------
-    for (i=i0 - 1 ; i <= i0 + 1 ; i++){ 
-      if (!aSurf->IsUPeriodic()){                          // Periodic conditions in U  
+    for (i=i0 - 1 ; i <= i0 + 1 ; i++){
+      if (!aSurf->IsUPeriodic()){                          // Periodic conditions in U
         if (i > _gridU ){
           break; }
         else if (i < 0){
           i++; }
       }
       ip = (i + _gridU + 1) % (_gridU+1);                  // We get a periodic index :
-      for (j=j0 - 1 ; j <= j0 + 1 ; j++){                  //    ip=modulo(i,N+2) so that  i=-1->ip=N; i=0 -> ip=0 ; ... ; i=N+1 -> ip=0;  
-          if (!aSurf->IsVPeriodic()){                        // Periodic conditions in V .
+      for (j=j0 - 1 ; j <= j0 + 1 ; j++){                  //    ip=modulo(i,N+2) so that  i=-1->ip=N; i=0 -> ip=0 ; ... ; i=N+1 -> ip=0;
+        if (!aSurf->IsVPeriodic()){                        // Periodic conditions in V .
           if (j > _gridV ){
             break; }
           else if (j < 0){
@@ -313,23 +317,23 @@ void BLSURFPlugin_Attractor::BuildMap() {
           }
         }
         jp = (j + _gridV + 1) % (_gridV+1);
-      
+
         if (!_known[ip][jp]){                              // If the distance is not known yet
           aSurf->D1(_vectU[ip],_vectV[jp],P,D1U,D1V);      // Calculate the metric tensor at (i,j)
-          // G(i,j)  =  | ||dS/du||**2          *     | 
+          // G(i,j)  =  | ||dS/du||**2          *     |
           //            | <dS/du,dS/dv>  ||dS/dv||**2 |
-          Guu = D1U.X()*D1U.X() +  D1U.Y()*D1U.Y() + D1U.Z()*D1U.Z();    // Guu = ||dS/du||**2    
-          Gvv = D1V.X()*D1V.X() +  D1V.Y()*D1V.Y() + D1V.Z()*D1V.Z();    // Gvv = ||dS/dv||**2           
-          Guv = D1U.X()*D1V.X() +  D1U.Y()*D1V.Y() + D1U.Z()*D1V.Z();    // Guv = Gvu = < dS/du,dS/dv > 
-          D_Ref = _DMap[ip][jp];                           // Set a ref. distance of the point to its value in _DMap 
+          Guu = D1U.X()*D1U.X() +  D1U.Y()*D1U.Y() + D1U.Z()*D1U.Z();    // Guu = ||dS/du||**2
+          Gvv = D1V.X()*D1V.X() +  D1V.Y()*D1V.Y() + D1V.Z()*D1V.Z();    // Gvv = ||dS/dv||**2
+          Guv = D1U.X()*D1V.X() +  D1U.Y()*D1V.Y() + D1U.Z()*D1V.Z();    // Guv = Gvu = < dS/du,dS/dv >
+          D_Ref = _DMap[ip][jp];                           // Set a ref. distance of the point to its value in _DMap
           TPnt[0] = D_Ref;                                 // (may be infinite or uncertain)
           TPnt[1] = ip;
           TPnt[2] = jp;
           Dist_changed = false;
-          
+
           // Loop on neighbours to calculate the min distance from them ---------------------------------------------------------------------------------
           for (k=i - 1 ; k <= i + 1 ; k++){
-            if (!aSurf->IsUPeriodic()){                              // Periodic conditions in U  
+            if (!aSurf->IsUPeriodic()){                              // Periodic conditions in U
               if(k > _gridU ){
                 break;
               }
@@ -337,15 +341,15 @@ void BLSURFPlugin_Attractor::BuildMap() {
                 k++; }
             }
             kp = (k + _gridU + 1) % (_gridU+1);                      // periodic index
-            for (n=j - 1 ; n <= j + 1 ; n++){ 
-              if (!aSurf->IsVPeriodic()){                            // Periodic conditions in V 
-                if(n > _gridV){   
+            for (n=j - 1 ; n <= j + 1 ; n++){
+              if (!aSurf->IsVPeriodic()){                            // Periodic conditions in V
+                if(n > _gridV){
                   break;
                 }
                 else if (n < 0){
                   n++; }
               }
-              np = (n + _gridV + 1) % (_gridV+1);                    
+              np = (n + _gridV + 1) % (_gridV+1);
               if (_known[kp][np]){                                   // If the distance of the neighbour is known
                                                                      // Calculate the distance from (k,n)
                 du = (k-i) * (_u2 - _u1) / _gridU;
@@ -358,8 +362,8 @@ void BLSURFPlugin_Attractor::BuildMap() {
               }
             }
           } // End of the loop on neighbours --------------------------------------------------------------------------------------------------------------
-          
-          if (Dist_changed) {                              // If distance has been updated, update _trial 
+
+          if (Dist_changed) {                              // If distance has been updated, update _trial
             found=_trial.find(TPnt);
             if (found != _trial.end()){
               _trial.erase(found);                         // Erase the point if it was already in _trial
index 3d082a4f83b23552d240736b510163548ce96b09..a2741a17378ad081b6eb8604cf83b2ccd52f8554 100644 (file)
@@ -1565,7 +1565,7 @@ namespace
       //double tol = (( u2node.rbegin()->first - u2node.begin()->first ) / 20.) / u2node.size();
       Standard_Real f,l;
       BRep_Tool::Range( TopoDS::Edge( shape ), f,l );
-      double tol = (( l - f ) / 10.) / u2node.size(); // 10. - adjusted for #17262
+      double tol = (( l - f ) / 10.) / double( u2node.size() ); // 10. - adjusted for #17262
 
       std::multimap< double, const SMDS_MeshNode* >::iterator un2, un1;
       for ( un2 = u2node.begin(), un1 = un2++; un2 != u2node.end(); un1 = un2++ )
@@ -1818,7 +1818,7 @@ namespace
           if ( !n2nIt->second ) {
             n->GetXYZ( xyz );
             gp_XY uv = tmpHelper.GetNodeUV( _proxyFace, n );
-            n2nIt->second = helper.AddNode( xyz[0], xyz[1], xyz[2], uv.X(), uv.Y() );
+            n2nIt->second = helper.AddNode( xyz[0], xyz[1], xyz[2], /*id=*/0, uv.X(), uv.Y() );
           }
           nodes[ nbN ] = n2nIt->second;
         }
@@ -2240,7 +2240,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
           tmin = nodeDataVec.front().param;
           tmax = nodeDataVec.back().param;
 
-          existingPhySize += nodeData->Length() / ( nodeDataVec.size() - 1 );
+          existingPhySize += nodeData->Length() / double( nodeDataVec.size() - 1 );
         }
         else
         {
@@ -2288,7 +2288,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
       if ( nodeData )
       {
         const std::vector<UVPtStruct>& nodeDataVec = nodeData->GetUVPtStruct();
-        const int                      nbNodes     = nodeDataVec.size();
+        const int                      nbNodes     = (int) nodeDataVec.size();
 
         dcad_edge_discretization_t *dedge;
         dcad_get_edge_discretization(dcad, edg, &dedge);
@@ -2415,8 +2415,9 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
       {
         // If no source points, call periodicity without transformation function
         meshgems_cad_periodicity_transformation_t periodicity_transformation = NULL;
-        status = cad_add_face_multiple_periodicity_with_transformation_function(c, theFace1_ids_c, theFace1_ids.size(),
-                                                                                theFace2_ids_c, theFace2_ids.size(), periodicity_transformation, NULL);
+        status = cad_add_face_multiple_periodicity_with_transformation_function
+          (c, theFace1_ids_c, (meshgems_integer) theFace1_ids.size(), theFace2_ids_c,
+           (meshgems_integer) theFace2_ids.size(), periodicity_transformation, NULL);
         if(status != STATUS_OK)
           cout << "cad_add_face_multiple_periodicity_with_transformation_function failed with error code " << status << "\n";
       }
@@ -2425,11 +2426,12 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
         // get the transformation vertices
         double* theSourceVerticesCoords_c = &_preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords[0];
         double* theTargetVerticesCoords_c = &_preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords[0];
-        int nbSourceVertices = _preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3;
-        int nbTargetVertices = _preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3;
+        int nbSourceVertices = (int)_preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3;
+        int nbTargetVertices = (int)_preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3;
 
-        status = cad_add_face_multiple_periodicity_with_transformation_function_by_points(c, theFace1_ids_c, theFace1_ids.size(),
-                                                                                          theFace2_ids_c, theFace2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices);
+        status = cad_add_face_multiple_periodicity_with_transformation_function_by_points
+          (c, theFace1_ids_c, (meshgems_integer) theFace1_ids.size(), theFace2_ids_c,
+           (meshgems_integer) theFace2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices);
         if(status != STATUS_OK)
           cout << "cad_add_face_multiple_periodicity_with_transformation_function_by_points failed with error code " << status << "\n";
       }
@@ -2460,8 +2462,9 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
       {
         // If no source points, call periodicity without transformation function
         meshgems_cad_periodicity_transformation_t periodicity_transformation = NULL;
-        status = cad_add_edge_multiple_periodicity_with_transformation_function(c, theEdge1_ids_c, theEdge1_ids.size(),
-                                                                                theEdge2_ids_c, theEdge2_ids.size(), periodicity_transformation, NULL);
+        status = cad_add_edge_multiple_periodicity_with_transformation_function
+          (c, theEdge1_ids_c, (meshgems_integer) theEdge1_ids.size(), theEdge2_ids_c,
+           (meshgems_integer) theEdge2_ids.size(), periodicity_transformation, NULL);
         if(status != STATUS_OK)
           cout << "cad_add_edge_multiple_periodicity_with_transformation_function failed with error code " << status << "\n";
       }
@@ -2470,11 +2473,12 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
         // get the transformation vertices
         double* theSourceVerticesCoords_c = &_preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords[0];
         double* theTargetVerticesCoords_c = &_preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords[0];
-        int nbSourceVertices = _preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3;
-        int nbTargetVertices = _preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3;
+        int nbSourceVertices = (int) _preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3;
+        int nbTargetVertices = (int) _preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3;
 
-        status = cad_add_edge_multiple_periodicity_with_transformation_function_by_points(c, theEdge1_ids_c, theEdge1_ids.size(),
-                                                                                          theEdge2_ids_c, theEdge2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices);
+        status = cad_add_edge_multiple_periodicity_with_transformation_function_by_points
+          (c, theEdge1_ids_c, (meshgems_integer) theEdge1_ids.size(), theEdge2_ids_c,
+           (meshgems_integer) theEdge2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices);
         if(status != STATUS_OK)
           cout << "cad_add_edge_multiple_periodicity_with_transformation_function_by_points failed with error code " << status << "\n";
       }
@@ -2960,6 +2964,10 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelpe
   context_t *ctx = context_new();
   if (!ctx) return error("Pb in context_new()");
 
+  if ( aMesh.NbNodes() > std::numeric_limits< meshgems_integer >::max() ||
+       aMesh.NbFaces() > std::numeric_limits< meshgems_integer >::max() )
+    return error("Too large input mesh");
+
   BLSURF_Cleaner cleaner( ctx );
 
   message_cb_user_data mcud;
@@ -2978,7 +2986,7 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelpe
   // Fill an input mesh
 
   mesh_t * msh = meshgems_mesh_new_in_memory( ctx );
-  if ( !msh ) return error("Pb. in meshgems_mesh_new_in_memory()"); 
+  if ( !msh ) return error("Pb. in meshgems_mesh_new_in_memory()");
 
   // mark nodes used by 2D elements
   SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
@@ -2988,7 +2996,7 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelpe
     const SMDS_MeshNode* n = nodeIt->next();
     n->setIsMarked( n->NbInverseElements( SMDSAbs_Face ));
   }
-  meshgems_mesh_set_vertex_count( msh, meshDS->NbNodes() );
+  meshgems_mesh_set_vertex_count( msh, (meshgems_integer) meshDS->NbNodes() );
 
   // set node coordinates
   if ( meshDS->NbNodes() != meshDS->MaxNodeID() )
@@ -3005,8 +3013,8 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelpe
   }
 
   // set nodes of faces
-  meshgems_mesh_set_triangle_count  ( msh, meshDS->GetMeshInfo().NbTriangles() );
-  meshgems_mesh_set_quadrangle_count( msh, meshDS->GetMeshInfo().NbQuadrangles() );
+  meshgems_mesh_set_triangle_count  ( msh, (meshgems_integer) meshDS->GetMeshInfo().NbTriangles() );
+  meshgems_mesh_set_quadrangle_count( msh, (meshgems_integer) meshDS->GetMeshInfo().NbQuadrangles() );
   meshgems_integer nodeIDs[4];
   meshgems_integer iT = 1, iQ = 1;
   SMDS_FaceIteratorPtr faceIt = meshDS->facesIterator();
@@ -3017,7 +3025,7 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelpe
     if ( nbNodes > 4 || face->IsPoly() ) continue;
 
     for ( i = 0; i < nbNodes; ++i )
-      nodeIDs[i] = face->GetNode( i )->GetID();
+      nodeIDs[i] = (meshgems_integer) face->GetNode( i )->GetID();
     if ( nbNodes == 3 )
       meshgems_mesh_set_triangle_vertices  ( msh, iT++, nodeIDs );
     else
@@ -3077,7 +3085,7 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelpe
   {
     meshgems_mesh_get_vertex_coordinates( omsh, i, xyz );
     SMDS_MeshNode* n = meshDS->AddNode( xyz[0], xyz[1], xyz[2] );
-    nodeID = n->GetID();
+    nodeID = (meshgems_integer) n->GetID();
     meshgems_mesh_set_vertex_tag( omsh, i, &nodeID ); // save mapping of IDs in MG and SALOME meshes
   }
 
@@ -3417,7 +3425,7 @@ status_t message_cb(message_t *msg, void *user_data)
        err.find("periodicity") != string::npos )
   {
     // remove ^A from the tail
-    int len = strlen( desc );
+    size_t len = strlen( desc );
     while (len > 0 && desc[len-1] != '\n')
       len--;
     mcud->_error->append( desc, len );
index a6070b66ae61685bdc6d95b3312610550f97cbe8..1fa6be64ca6d4782d8a00fbdadc38ac7b4850695 100644 (file)
@@ -292,7 +292,8 @@ std::string BLSURFPlugin_Hypothesis::GetMeshGemsVersion()
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh) {
+void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh)
+{
   if (thePhysicalMesh != _physicalMesh) {
     _physicalMesh = thePhysicalMesh;
     NotifySubMeshesHypothesisModification();
@@ -300,7 +301,8 @@ void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetGeometricMesh(GeometricMesh theGeometricMesh) {
+void BLSURFPlugin_Hypothesis::SetGeometricMesh(GeometricMesh theGeometricMesh)
+{
   if (theGeometricMesh != _geometricMesh) {
     _geometricMesh = theGeometricMesh;
 //     switch (_geometricMesh) {
@@ -315,7 +317,8 @@ void BLSURFPlugin_Hypothesis::SetGeometricMesh(GeometricMesh theGeometricMesh) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetPhySize(double theVal, bool isRelative) {
+void BLSURFPlugin_Hypothesis::SetPhySize(double theVal, bool isRelative)
+{
   if ((theVal != _phySize) || (isRelative != _phySizeRel)) {
     _phySizeRel = isRelative;
     if (theVal == 0) {
@@ -328,7 +331,8 @@ void BLSURFPlugin_Hypothesis::SetPhySize(double theVal, bool isRelative) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetMinSize(double theMinSize, bool isRelative) {
+void BLSURFPlugin_Hypothesis::SetMinSize(double theMinSize, bool isRelative)
+{
   if ((theMinSize != _minSize) || (isRelative != _minSizeRel)) {
     _minSizeRel = isRelative;
     _minSize = theMinSize;
@@ -337,7 +341,8 @@ void BLSURFPlugin_Hypothesis::SetMinSize(double theMinSize, bool isRelative) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetMaxSize(double theMaxSize, bool isRelative) {
+void BLSURFPlugin_Hypothesis::SetMaxSize(double theMaxSize, bool isRelative)
+{
   if ((theMaxSize != _maxSize) || (isRelative != _maxSizeRel)) {
     _maxSizeRel = isRelative;
     _maxSize = theMaxSize;
@@ -346,7 +351,8 @@ void BLSURFPlugin_Hypothesis::SetMaxSize(double theMaxSize, bool isRelative) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetUseGradation(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetUseGradation(bool theVal)
+{
   if (theVal != _useGradation) {
     _useGradation = theVal;
     NotifySubMeshesHypothesisModification();
@@ -354,7 +360,8 @@ void BLSURFPlugin_Hypothesis::SetUseGradation(bool theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetGradation(double theVal) {
+void BLSURFPlugin_Hypothesis::SetGradation(double theVal)
+{
   _useGradation = ( theVal > 0 );
   if (theVal != _gradation) {
     _gradation = theVal;
@@ -363,7 +370,8 @@ void BLSURFPlugin_Hypothesis::SetGradation(double theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetUseVolumeGradation(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetUseVolumeGradation(bool theVal)
+{
   if (theVal != _useVolumeGradation) {
     _useVolumeGradation = theVal;
     NotifySubMeshesHypothesisModification();
@@ -371,7 +379,8 @@ void BLSURFPlugin_Hypothesis::SetUseVolumeGradation(bool theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetVolumeGradation(double theVal) {
+void BLSURFPlugin_Hypothesis::SetVolumeGradation(double theVal)
+{
   _useVolumeGradation = ( theVal > 0 );
   if (theVal != _volumeGradation) {
     _volumeGradation = theVal;
@@ -380,7 +389,8 @@ void BLSURFPlugin_Hypothesis::SetVolumeGradation(double theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetElementType(ElementType theElementType) {
+void BLSURFPlugin_Hypothesis::SetElementType(ElementType theElementType)
+{
   if (theElementType != _elementType) {
     _elementType = theElementType;
     NotifySubMeshesHypothesisModification();
@@ -388,7 +398,8 @@ void BLSURFPlugin_Hypothesis::SetElementType(ElementType theElementType) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetAngleMesh(double theVal) {
+void BLSURFPlugin_Hypothesis::SetAngleMesh(double theVal)
+{
   if (theVal != _angleMesh) {
     _angleMesh = theVal;
     NotifySubMeshesHypothesisModification();
@@ -396,7 +407,8 @@ void BLSURFPlugin_Hypothesis::SetAngleMesh(double theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetChordalError(double theDistance) {
+void BLSURFPlugin_Hypothesis::SetChordalError(double theDistance)
+{
   if (theDistance != _chordalError) {
     _chordalError = theDistance;
     NotifySubMeshesHypothesisModification();
@@ -404,7 +416,8 @@ void BLSURFPlugin_Hypothesis::SetChordalError(double theDistance) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetAnisotropic(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetAnisotropic(bool theVal)
+{
   if (theVal != _anisotropic) {
     _anisotropic = theVal;
     NotifySubMeshesHypothesisModification();
@@ -412,7 +425,8 @@ void BLSURFPlugin_Hypothesis::SetAnisotropic(bool theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetAnisotropicRatio(double theVal) {
+void BLSURFPlugin_Hypothesis::SetAnisotropicRatio(double theVal)
+{
   if (theVal != _anisotropicRatio) {
     _anisotropicRatio = theVal;
     NotifySubMeshesHypothesisModification();
@@ -420,7 +434,8 @@ void BLSURFPlugin_Hypothesis::SetAnisotropicRatio(double theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetRemoveTinyEdges(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetRemoveTinyEdges(bool theVal)
+{
   if (theVal != _removeTinyEdges) {
     _removeTinyEdges = theVal;
     NotifySubMeshesHypothesisModification();
@@ -428,7 +443,8 @@ void BLSURFPlugin_Hypothesis::SetRemoveTinyEdges(bool theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetTinyEdgeLength(double theVal) {
+void BLSURFPlugin_Hypothesis::SetTinyEdgeLength(double theVal)
+{
   if (theVal != _tinyEdgeLength) {
     _tinyEdgeLength = theVal;
     NotifySubMeshesHypothesisModification();
@@ -436,7 +452,8 @@ void BLSURFPlugin_Hypothesis::SetTinyEdgeLength(double theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetOptimiseTinyEdges(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetOptimiseTinyEdges(bool theVal)
+{
   if (theVal != _optimiseTinyEdges) {
     _optimiseTinyEdges = theVal;
     NotifySubMeshesHypothesisModification();
@@ -444,7 +461,8 @@ void BLSURFPlugin_Hypothesis::SetOptimiseTinyEdges(bool theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetTinyEdgeOptimisationLength(double theVal) {
+void BLSURFPlugin_Hypothesis::SetTinyEdgeOptimisationLength(double theVal)
+{
   if (theVal != _tinyEdgeOptimisationLength) {
     _tinyEdgeOptimisationLength = theVal;
     NotifySubMeshesHypothesisModification();
@@ -452,7 +470,8 @@ void BLSURFPlugin_Hypothesis::SetTinyEdgeOptimisationLength(double theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersection(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersection(bool theVal)
+{
   if (theVal != _correctSurfaceIntersec) {
     _correctSurfaceIntersec = theVal;
     NotifySubMeshesHypothesisModification();
@@ -460,7 +479,8 @@ void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersection(bool theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersectionMaxCost(double theVal) {
+void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersectionMaxCost(double theVal)
+{
   if (theVal != _corrSurfaceIntersCost) {
     _corrSurfaceIntersCost = theVal;
     NotifySubMeshesHypothesisModification();
@@ -468,7 +488,8 @@ void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersectionMaxCost(double theVal
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetBadElementRemoval(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetBadElementRemoval(bool theVal)
+{
   if (theVal != _badElementRemoval) {
     _badElementRemoval = theVal;
     NotifySubMeshesHypothesisModification();
@@ -476,7 +497,8 @@ void BLSURFPlugin_Hypothesis::SetBadElementRemoval(bool theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetBadElementAspectRatio(double theVal) {
+void BLSURFPlugin_Hypothesis::SetBadElementAspectRatio(double theVal)
+{
   if (theVal != _badElementAspectRatio) {
     _badElementAspectRatio = theVal;
     NotifySubMeshesHypothesisModification();
@@ -484,7 +506,8 @@ void BLSURFPlugin_Hypothesis::SetBadElementAspectRatio(double theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetOptimizeMesh(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetOptimizeMesh(bool theVal)
+{
   if (theVal != _optimizeMesh) {
     _optimizeMesh = theVal;
     NotifySubMeshesHypothesisModification();
@@ -492,7 +515,8 @@ void BLSURFPlugin_Hypothesis::SetOptimizeMesh(bool theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetQuadraticMesh(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetQuadraticMesh(bool theVal)
+{
   if (theVal != _quadraticMesh) {
     _quadraticMesh = theVal;
     NotifySubMeshesHypothesisModification();
@@ -500,7 +524,8 @@ void BLSURFPlugin_Hypothesis::SetQuadraticMesh(bool theVal) {
 }
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetTopology(Topology theTopology) {
+void BLSURFPlugin_Hypothesis::SetTopology(Topology theTopology)
+{
   if (theTopology != _topology) {
     _topology = theTopology;
     NotifySubMeshesHypothesisModification();
@@ -864,7 +889,7 @@ void BLSURFPlugin_Hypothesis::SetHyperPatches(const THyperPatchList& hpl, bool n
           _hyperPatchList[ *iPatch ].clear();
         }
         if ( iPatches.size() > 1 )
-          for ( int j = _hyperPatchList.size()-1; j > 0; --j )
+          for ( int j = (int) _hyperPatchList.size()-1; j > 0; --j )
             if ( _hyperPatchList[j].empty() )
               _hyperPatchList.erase( _hyperPatchList.begin() + j );
       }
@@ -943,7 +968,7 @@ int BLSURFPlugin_Hypothesis::GetHyperPatchTag( const int                      fa
     for ( size_t i = 0; i < hpl.size(); ++i )
       if ( hpl[i].count( faceTag ))
       {
-        if ( iPatch ) *iPatch = i;
+        if ( iPatch ) *iPatch = (int) i;
         return *( hpl[i].begin() );
       }
   }
@@ -1042,7 +1067,7 @@ void BLSURFPlugin_Hypothesis::SetOptionValue(const std::string& optionName, cons
     // strip white spaces
     while (ptr[0] == ' ')
       ptr++;
-    int i = strlen(ptr);
+    size_t i = strlen(ptr);
     while (i != 0 && ptr[i - 1] == ' ')
       i--;
     // check value type
@@ -1096,7 +1121,7 @@ void BLSURFPlugin_Hypothesis::SetPreCADOptionValue(const std::string& optionName
     // strip white spaces
     while (ptr[0] == ' ')
       ptr++;
-    int i = strlen(ptr);
+    size_t i = strlen(ptr);
     while (i != 0 && ptr[i - 1] == ' ')
       i--;
     // check value type
@@ -1891,7 +1916,8 @@ void BLSURFPlugin_Hypothesis::ClearAllEnforcedVertices()
 
 
 BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexListMap BLSURFPlugin_Hypothesis::GetAllEnforcedVerticesByFace(
-    const BLSURFPlugin_Hypothesis* hyp) {
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetAllEnforcedVerticesByFace() : GetDefaultFaceEntryEnfVertexListMap();
 }
 
@@ -1912,27 +1938,32 @@ BLSURFPlugin_Hypothesis::TEnfGroupName BLSURFPlugin_Hypothesis::GetInternalEnfor
 }
 
 BLSURFPlugin_Hypothesis::TEnfVertexList BLSURFPlugin_Hypothesis::GetAllEnforcedVertices(
-    const BLSURFPlugin_Hypothesis* hyp) {
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetAllEnforcedVertices() : GetDefaultEnfVertexList();
 }
 
 BLSURFPlugin_Hypothesis::TFaceEntryCoordsListMap BLSURFPlugin_Hypothesis::GetAllCoordsByFace(
-    const BLSURFPlugin_Hypothesis* hyp) {
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetAllCoordsByFace() : GetDefaultFaceEntryCoordsListMap();
 }
 
 BLSURFPlugin_Hypothesis::TCoordsEnfVertexMap BLSURFPlugin_Hypothesis::GetAllEnforcedVerticesByCoords(
-    const BLSURFPlugin_Hypothesis* hyp) {
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetAllEnforcedVerticesByCoords() : GetDefaultCoordsEnfVertexMap();
 }
 
 BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexEntryListMap BLSURFPlugin_Hypothesis::GetAllEnfVertexEntriesByFace(
-    const BLSURFPlugin_Hypothesis* hyp) {
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetAllEnfVertexEntriesByFace() : GetDefaultFaceEntryEnfVertexEntryListMap();
 }
 
 BLSURFPlugin_Hypothesis::TEnfVertexEntryEnfVertexMap BLSURFPlugin_Hypothesis::GetAllEnforcedVerticesByEnfVertexEntry(
-    const BLSURFPlugin_Hypothesis* hyp) {
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetAllEnforcedVerticesByEnfVertexEntry() : GetDefaultEnfVertexEntryEnfVertexMap();
 }
 
@@ -1970,7 +2001,8 @@ void BLSURFPlugin_Hypothesis::RemoveEnfVertexNodeID(TEnfGroupName theGroupName,s
 
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFaces(bool toEnforceInternalVertices) {
+void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFaces(bool toEnforceInternalVertices)
+{
   if (toEnforceInternalVertices != _enforcedInternalVerticesAllFaces) {
     _enforcedInternalVerticesAllFaces = toEnforceInternalVertices;
     if (toEnforceInternalVertices)
@@ -1981,7 +2013,8 @@ void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFaces(bool toEnforceIn
 
 
 //=============================================================================
-void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFacesGroup(BLSURFPlugin_Hypothesis::TEnfGroupName theGroupName) {
+void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFacesGroup(BLSURFPlugin_Hypothesis::TEnfGroupName theGroupName)
+{
   if (std::string(theGroupName) != std::string(_enforcedInternalVerticesAllFacesGroup)) {
     _enforcedInternalVerticesAllFacesGroup = theGroupName;
     NotifySubMeshesHypothesisModification();
@@ -1990,38 +2023,44 @@ void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFacesGroup(BLSURFPlugi
 
 //=============================================================================
 BLSURFPlugin_Hypothesis::TPreCadPeriodicityVector BLSURFPlugin_Hypothesis::GetPreCadFacesPeriodicityVector(
-    const BLSURFPlugin_Hypothesis* hyp) {
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetPreCadFacesPeriodicityVector() : GetDefaultPreCadFacesPeriodicityVector();
 }
 
 //=============================================================================
 BLSURFPlugin_Hypothesis::TPreCadPeriodicityVector BLSURFPlugin_Hypothesis::GetPreCadEdgesPeriodicityVector(
-    const BLSURFPlugin_Hypothesis* hyp) {
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetPreCadEdgesPeriodicityVector() : GetDefaultPreCadEdgesPeriodicityVector();
 }
 
 //=============================================================================
 BLSURFPlugin_Hypothesis::TFacesPeriodicityVector BLSURFPlugin_Hypothesis::GetFacesPeriodicityVector(
-    const BLSURFPlugin_Hypothesis* hyp) {
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetFacesPeriodicityVector() : GetDefaultFacesPeriodicityVector();
 }
 
 //=============================================================================
 BLSURFPlugin_Hypothesis::TEdgesPeriodicityVector BLSURFPlugin_Hypothesis::GetEdgesPeriodicityVector(
-    const BLSURFPlugin_Hypothesis* hyp){
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetEdgesPeriodicityVector() : GetDefaultEdgesPeriodicityVector();
 }
 
 //=============================================================================
 BLSURFPlugin_Hypothesis::TVerticesPeriodicityVector BLSURFPlugin_Hypothesis::GetVerticesPeriodicityVector(
-    const BLSURFPlugin_Hypothesis* hyp){
+    const BLSURFPlugin_Hypothesis* hyp)
+{
   return hyp ? hyp->_GetVerticesPeriodicityVector() : GetDefaultVerticesPeriodicityVector();
 }
 
 //=======================================================================
 //function : ClearAllEnforcedVertices
 //=======================================================================
-void BLSURFPlugin_Hypothesis::ClearPreCadPeriodicityVectors() {
+void BLSURFPlugin_Hypothesis::ClearPreCadPeriodicityVectors()
+{
   _preCadFacesPeriodicityVector.clear();
   _preCadEdgesPeriodicityVector.clear();
   NotifySubMeshesHypothesisModification();
@@ -2031,7 +2070,8 @@ void BLSURFPlugin_Hypothesis::ClearPreCadPeriodicityVectors() {
 //function : AddPreCadFacesPeriodicity
 //=======================================================================
 void BLSURFPlugin_Hypothesis::AddPreCadFacesPeriodicity(TEntry theFace1Entry, TEntry theFace2Entry,
-                                                        std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries) {
+                                                        std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries)
+{
 
   TPreCadPeriodicity preCadFacesPeriodicity;
   preCadFacesPeriodicity.shape1Entry = theFace1Entry;
@@ -2048,8 +2088,8 @@ void BLSURFPlugin_Hypothesis::AddPreCadFacesPeriodicity(TEntry theFace1Entry, TE
 //function : AddPreCadEdgesPeriodicity
 //=======================================================================
 void BLSURFPlugin_Hypothesis::AddPreCadEdgesPeriodicity(TEntry theEdge1Entry, TEntry theEdge2Entry,
-    std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries) {
-
+    std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries)
+{
   TPreCadPeriodicity preCadEdgesPeriodicity;
   preCadEdgesPeriodicity.shape1Entry = theEdge1Entry;
   preCadEdgesPeriodicity.shape2Entry = theEdge2Entry;
@@ -2258,8 +2298,8 @@ std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save)
   return save;
 }
 
-void BLSURFPlugin_Hypothesis::SaveFacesPeriodicity(std::ostream & save){
-
+void BLSURFPlugin_Hypothesis::SaveFacesPeriodicity(std::ostream & save)
+{
   TFacesPeriodicityVector::const_iterator it_faces_periodicity = _facesPeriodicityVector.begin();
   if (it_faces_periodicity != _facesPeriodicityVector.end()) {
     save << " " << "__FACES_PERIODICITY_BEGIN__";
@@ -2278,8 +2318,8 @@ void BLSURFPlugin_Hypothesis::SaveFacesPeriodicity(std::ostream & save){
   }
 }
 
-void BLSURFPlugin_Hypothesis::SaveEdgesPeriodicity(std::ostream & save){
-
+void BLSURFPlugin_Hypothesis::SaveEdgesPeriodicity(std::ostream & save)
+{
   TEdgesPeriodicityVector::const_iterator it_edges_periodicity = _edgesPeriodicityVector.begin();
   if (it_edges_periodicity != _edgesPeriodicityVector.end()) {
     save << " " << "__EDGES_PERIODICITY_BEGIN__";
@@ -2311,8 +2351,8 @@ void BLSURFPlugin_Hypothesis::SaveEdgesPeriodicity(std::ostream & save){
   }
 }
 
-void BLSURFPlugin_Hypothesis::SaveVerticesPeriodicity(std::ostream & save){
-
+void BLSURFPlugin_Hypothesis::SaveVerticesPeriodicity(std::ostream & save)
+{
   TVerticesPeriodicityVector::const_iterator it_vertices_periodicity = _verticesPeriodicityVector.begin();
   if (it_vertices_periodicity != _verticesPeriodicityVector.end()) {
     save << " " << "__VERTICES_PERIODICITY_BEGIN__";
@@ -2337,7 +2377,8 @@ void BLSURFPlugin_Hypothesis::SaveVerticesPeriodicity(std::ostream & save){
   }
 }
 
-void BLSURFPlugin_Hypothesis::SavePreCADPeriodicity(std::ostream & save, const char* shapeType) {
+void BLSURFPlugin_Hypothesis::SavePreCADPeriodicity(std::ostream & save, const char* shapeType)
+{
   TPreCadPeriodicityVector precad_periodicity;
   if ( shapeType  &&  strcmp( shapeType, "FACES" ) == 0 )
     precad_periodicity = _preCadFacesPeriodicityVector;
@@ -2752,14 +2793,14 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
         ) {
       std::string & value = _option2value[optName];
       value = optValue;
-      int len = value.size();
+      int len = (int) value.size();
       // continue reading until "%#" encountered
       while (value[len - 1] != '#' || value[len - 2] != '%') {
         isOK = static_cast<bool>(load >> optValue);
         if (isOK) {
           value += " ";
           value += optValue;
-          len = value.size();
+          len = (int) value.size();
         } else {
           break;
         }
@@ -2806,14 +2847,14 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
     }
     if (isOK) {
       std::string& value = optValue;
-      int len = value.size();
+      int len = (int) value.size();
       // continue reading until "%#" encountered
       while (value[len - 1] != '#' || value[len - 2] != '%') {
         isOK = static_cast<bool>(load >> optValue);
         if (isOK) {
           value += " ";
           value += optValue;
-          len = value.size();
+          len = (int) value.size();
         } else {
           break;
         }
@@ -2860,14 +2901,14 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
     if (isOK) {
       std::string & value = _preCADoption2value[optName];
       value = optValue;
-      int len = value.size();
+      int len = (int) value.size();
       // continue reading until "%#" encountered
       while (value[len - 1] != '#' || value[len - 2] != '%') {
         isOK = static_cast<bool>(load >> optValue);
         if (isOK) {
           value += " ";
           value += optValue;
-          len = value.size();
+          len = (int) value.size();
         } else {
           break;
         }
@@ -2912,14 +2953,14 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
     if (isOK) {
       std::string & value2 = _sizeMap[smEntry];
       value2 = smValue;
-      int len2 = value2.size();
+      int len2 = (int) value2.size();
       // continue reading until "%#" encountered
       while (value2[len2 - 1] != '#' || value2[len2 - 2] != '%') {
         isOK = static_cast<bool>(load >> smValue);
         if (isOK) {
           value2 += " ";
           value2 += smValue;
-          len2 = value2.size();
+          len2 = (int) value2.size();
         } else {
           break;
         }
@@ -2961,14 +3002,14 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
     if (isOK) {
       std::string & value3 = _attractors[atEntry];
       value3 = atValue;
-      int len3 = value3.size();
+      int len3 = (int) value3.size();
       // continue reading until "%#" encountered
       while (value3[len3 - 1] != '#' || value3[len3 - 2] != '%') {
         isOK = static_cast<bool>(load >> atValue);
         if (isOK) {
           value3 += " ";
           value3 += atValue;
-          len3 = value3.size();
+          len3 = (int) value3.size();
         } else {
           break;
         }
@@ -3304,8 +3345,8 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
   return load;
 }
 
-void BLSURFPlugin_Hypothesis::LoadFacesPeriodicity(std::istream & load){
-
+void BLSURFPlugin_Hypothesis::LoadFacesPeriodicity(std::istream & load)
+{
   bool isOK = true;
 
   std::string periodicitySeparator;
@@ -3353,8 +3394,8 @@ void BLSURFPlugin_Hypothesis::LoadFacesPeriodicity(std::istream & load){
 }
 
 
-void BLSURFPlugin_Hypothesis::LoadEdgesPeriodicity(std::istream & load){
-
+void BLSURFPlugin_Hypothesis::LoadEdgesPeriodicity(std::istream & load)
+{
   bool isOK = true;
 
   std::string periodicitySeparator;
@@ -3495,8 +3536,8 @@ void BLSURFPlugin_Hypothesis::LoadVerticesPeriodicity(std::istream & load)
   }
 }
 
-void BLSURFPlugin_Hypothesis::LoadPreCADPeriodicity(std::istream & load, const char* shapeType) {
-
+void BLSURFPlugin_Hypothesis::LoadPreCADPeriodicity(std::istream & load, const char* shapeType)
+{
   bool isOK = true;
 
   std::string periodicitySeparator;
@@ -3601,7 +3642,8 @@ std::istream & operator >>(std::istream & load, BLSURFPlugin_Hypothesis & hyp) {
  */
 //================================================================================
 
-bool BLSURFPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/, const TopoDS_Shape& /*theShape*/) {
+bool BLSURFPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/, const TopoDS_Shape& /*theShape*/)
+{
   return false;
 }
 
@@ -3611,7 +3653,8 @@ bool BLSURFPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
  */
 //================================================================================
 
-double BLSURFPlugin_Hypothesis::GetDefaultPhySize(double diagonal, double bbSegmentation) {
+double BLSURFPlugin_Hypothesis::GetDefaultPhySize(double diagonal, double bbSegmentation)
+{
   if (bbSegmentation != 0 && diagonal != 0)
     return diagonal / bbSegmentation ;
   return 10;
@@ -3623,7 +3666,8 @@ double BLSURFPlugin_Hypothesis::GetDefaultPhySize(double diagonal, double bbSegm
  */
 //================================================================================
 
-double BLSURFPlugin_Hypothesis::GetDefaultMinSize(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultMinSize(double diagonal)
+{
   if (diagonal != 0)
     return diagonal / 1000.0 ;
   return undefinedDouble();
@@ -3635,7 +3679,8 @@ double BLSURFPlugin_Hypothesis::GetDefaultMinSize(double diagonal) {
  */
 //================================================================================
 
-double BLSURFPlugin_Hypothesis::GetDefaultMaxSize(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultMaxSize(double diagonal)
+{
   if (diagonal != 0)
     return diagonal / 5.0 ;
   return undefinedDouble();
@@ -3647,7 +3692,8 @@ double BLSURFPlugin_Hypothesis::GetDefaultMaxSize(double diagonal) {
  */
 //================================================================================
 
-double BLSURFPlugin_Hypothesis::GetDefaultChordalError(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultChordalError(double diagonal)
+{
   if (diagonal != 0)
     return diagonal;
   return undefinedDouble();
@@ -3659,7 +3705,8 @@ double BLSURFPlugin_Hypothesis::GetDefaultChordalError(double diagonal) {
  */
 //================================================================================
 
-double BLSURFPlugin_Hypothesis::GetDefaultTinyEdgeLength(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultTinyEdgeLength(double diagonal)
+{
   if (diagonal != 0)
     return diagonal * 1e-6 ;
   return undefinedDouble();
@@ -3671,7 +3718,8 @@ double BLSURFPlugin_Hypothesis::GetDefaultTinyEdgeLength(double diagonal) {
  */
 //================================================================================
 
-double BLSURFPlugin_Hypothesis::GetDefaultTinyEdgeOptimisationLength(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultTinyEdgeOptimisationLength(double diagonal)
+{
   if (diagonal != 0)
     return diagonal * 1e-6 ;
   return undefinedDouble();
@@ -3723,7 +3771,7 @@ bool BLSURFPlugin_Hypothesis::ToBool(const std::string& str, bool* isOk )
   if ( isOk ) *isOk = true;
 
   for ( size_t i = 0; i <= s.size(); ++i )
-    s[i] = tolower( s[i] );
+    s[i] = (char) tolower( s[i] );
 
   if ( s == "1" || s == "true" || s == "active" || s == "yes" )
     return true;
index 9495b48da1c68c2d764e2fc6384cdda3cb2129a2..ec9b6bfbd5b791029c03c4d1ab9f55f3a84ab3ae 100644 (file)
@@ -829,7 +829,7 @@ void BLSURFPlugin_Hypothesis_i::SetNbSurfaceProximityLayers( CORBA::Short nbLaye
 
 CORBA::Short BLSURFPlugin_Hypothesis_i::GetNbSurfaceProximityLayers()
 {
-  return this->GetImpl()->GetNbSurfaceProximityLayers();
+  return (CORBA::Short) this->GetImpl()->GetNbSurfaceProximityLayers();
 }
 
 //=============================================================================
@@ -884,7 +884,7 @@ void BLSURFPlugin_Hypothesis_i::SetNbVolumeProximityLayers( CORBA::Short nbLayer
 
 CORBA::Short BLSURFPlugin_Hypothesis_i::GetNbVolumeProximityLayers()
 {
-  return this->GetImpl()->GetNbVolumeProximityLayers();
+  return (CORBA::Short) this->GetImpl()->GetNbVolumeProximityLayers();
 }
 
 //=============================================================================
@@ -1200,7 +1200,7 @@ void BLSURFPlugin_Hypothesis_i::SetHyperPatches(const BLSURFPlugin::THyperPatchL
   ::BLSURFPlugin_Hypothesis::THyperPatchList patchList( hpl.length() );
   SMESH_Comment hplDump;
   hplDump << "[";
-  for ( size_t i = 0; i < patchList.size(); ++i )
+  for ( CORBA::ULong i = 0; i < patchList.size(); ++i )
   {
     hplDump << "[ ";
     BLSURFPlugin::THyperPatch tags = hpl[ i ];
@@ -1225,7 +1225,7 @@ void BLSURFPlugin_Hypothesis_i::SetHyperPatchEntries(const BLSURFPlugin::THyperP
   ::BLSURFPlugin_Hypothesis::THyperPatchEntriesList patchList( hpe.length() );
   SMESH_Comment hpeDump;
   hpeDump << "[";
-  for ( size_t i = 0; i < patchList.size(); ++i )
+  for ( CORBA::ULong i = 0; i < patchList.size(); ++i )
   {
     hpeDump << "[ ";
     const BLSURFPlugin::THyperPatchEntries& entryList = hpe[ i ];
@@ -1250,7 +1250,7 @@ void BLSURFPlugin_Hypothesis_i::SetHyperPatchShapes(const BLSURFPlugin::THyperPa
 {
   BLSURFPlugin::THyperPatchEntriesList patchList;
   patchList.length( hpsl.length() );
-  for ( size_t i = 0; i < hpsl.length(); ++i )
+  for ( CORBA::ULong i = 0; i < hpsl.length(); ++i )
   {
     const GEOM::ListOfGO&             shapeList = hpsl[ i ];
     BLSURFPlugin::THyperPatchEntries& entryList = patchList[ i ];
@@ -1287,14 +1287,14 @@ BLSURFPlugin_Hypothesis_i::GetHyperPatches( GEOM::GEOM_Object_ptr mainShape )
       GetImpl()->SetHyperPatchIDsByEntry( S, entryToShape );
     }
   }
-  resHpl->length( hpl.size() );
+  resHpl->length((CORBA::ULong) hpl.size() );
 
   ::BLSURFPlugin_Hypothesis::THyperPatchList::const_iterator hpIt = hpl.begin();
   for ( int i = 0; hpIt != hpl.end(); ++hpIt, ++i )
   {
     const ::BLSURFPlugin_Hypothesis::THyperPatchTags& hp = *hpIt;
     BLSURFPlugin::THyperPatch& resHp = (*resHpl)[ i ];
-    resHp.length( hp.size() );
+    resHp.length((CORBA::ULong) hp.size() );
 
     ::BLSURFPlugin_Hypothesis::THyperPatchTags::const_iterator tag = hp.begin();
     for ( int j = 0; tag != hp.end(); ++tag, ++j )
@@ -1308,14 +1308,14 @@ BLSURFPlugin::THyperPatchEntriesList* BLSURFPlugin_Hypothesis_i::GetHyperPatchSh
 {
   const ::BLSURFPlugin_Hypothesis::THyperPatchEntriesList& hpel = GetImpl()->GetHyperPatchEntries();
   BLSURFPlugin::THyperPatchEntriesList* resHpl = new BLSURFPlugin::THyperPatchEntriesList();
-  resHpl->length( hpel.size() );
+  resHpl->length((CORBA::ULong) hpel.size() );
 
   ::BLSURFPlugin_Hypothesis::THyperPatchEntriesList::const_iterator hpIt = hpel.begin();
   for ( int i = 0; hpIt != hpel.end(); ++hpIt, ++i )
   {
     const ::BLSURFPlugin_Hypothesis::THyperPatchEntries& hp = *hpIt;
     BLSURFPlugin::THyperPatchEntries& resHp = (*resHpl)[ i ];
-    resHp.length( hp.size() );
+    resHp.length((CORBA::ULong) hp.size() );
 
     ::BLSURFPlugin_Hypothesis::THyperPatchEntries::const_iterator entry = hp.begin();
     for ( int j = 0; entry != hp.end(); ++entry, ++j )
@@ -1516,7 +1516,7 @@ void BLSURFPlugin_Hypothesis_i::SetOptionValue(const char* optionName, const cha
       SetVolumeProximityRatio( GetImpl()->ToDbl( optionValue ));
 
     else if ( name == "prox_nb_layer" )
-      SetNbVolumeProximityLayers( GetImpl()->ToInt( optionValue ));
+      SetNbVolumeProximityLayers((CORBA::Short) GetImpl()->ToInt( optionValue ));
 
     // advanced options (for backward compatibility)
 
@@ -1680,7 +1680,7 @@ BLSURFPlugin::string_array* BLSURFPlugin_Hypothesis_i::GetOptionValues() {
   BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
 
   const ::BLSURFPlugin_Hypothesis::TOptionValues & opts = this->GetImpl()->GetOptionValues();
-  result->length(opts.size());
+  result->length((CORBA::ULong) opts.size());
   int i=0;
 
   bool isDefault;
@@ -1705,7 +1705,7 @@ BLSURFPlugin::string_array* BLSURFPlugin_Hypothesis_i::GetPreCADOptionValues() {
   BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
 
   const ::BLSURFPlugin_Hypothesis::TOptionValues & opts = this->GetImpl()->GetPreCADOptionValues();
-  result->length(opts.size());
+  result->length((CORBA::ULong) opts.size());
   int i=0;
 
   bool isDefault;
@@ -1729,7 +1729,7 @@ BLSURFPlugin::string_array* BLSURFPlugin_Hypothesis_i::GetAdvancedOptionValues()
   BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
 
   const ::BLSURFPlugin_Hypothesis::TOptionValues & custom_opts = this->GetImpl()->GetCustomOptionValues();
-  result->length(custom_opts.size());
+  result->length((CORBA::ULong) custom_opts.size());
   int i=0;
 
   ::BLSURFPlugin_Hypothesis::TOptionValues::const_iterator opIt = custom_opts.begin();
@@ -1874,7 +1874,7 @@ void BLSURFPlugin_Hypothesis_i::AddOption(const char* optionName, const char* op
       SetVolumeProximityRatio( GetImpl()->ToDbl( optionValue ));
 
     else if ( name == "prox_nb_layer" )
-      SetNbVolumeProximityLayers( GetImpl()->ToInt( optionValue ));
+      SetNbVolumeProximityLayers( (CORBA::Short) GetImpl()->ToInt( optionValue ));
   }
   bool valueChanged = (this->GetImpl()->GetOption(optionName) != optionValue);
   if (valueChanged) {
@@ -2097,7 +2097,7 @@ BLSURFPlugin::string_array* BLSURFPlugin_Hypothesis_i::GetSizeMapEntries() {
   BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
 
   const ::BLSURFPlugin_Hypothesis::TSizeMap sizeMaps = this->GetImpl()->_GetSizeMapEntries();
-  result->length(sizeMaps.size());
+  result->length((CORBA::ULong) sizeMaps.size());
 
   ::BLSURFPlugin_Hypothesis::TSizeMap::const_iterator smIt = sizeMaps.begin();
   for (int i = 0; smIt != sizeMaps.end(); ++smIt, ++i) {
@@ -2118,7 +2118,7 @@ BLSURFPlugin::string_array* BLSURFPlugin_Hypothesis_i::GetAttractorEntries() {
   BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
 
   const ::BLSURFPlugin_Hypothesis::TSizeMap attractors = this->GetImpl()->_GetAttractorEntries();
-  result->length(attractors.size());
+  result->length((CORBA::ULong) attractors.size());
 
   ::BLSURFPlugin_Hypothesis::TSizeMap::const_iterator atIt = attractors.begin();
   for (int i = 0; atIt != attractors.end(); ++atIt, ++i) {
@@ -2140,7 +2140,7 @@ BLSURFPlugin::TAttParamsMap* BLSURFPlugin_Hypothesis_i::GetAttractorParams()
   BLSURFPlugin::TAttParamsMap_var result = new BLSURFPlugin::TAttParamsMap();
 
   const ::BLSURFPlugin_Hypothesis::TAttractorMap attractors= this->GetImpl()->_GetClassAttractorEntries();
-  result->length( attractors.size() );
+  result->length((CORBA::ULong) attractors.size() );
 
   ::BLSURFPlugin_Hypothesis::TAttractorMap::const_iterator atIt = attractors.begin();
   for ( int i = 0 ; atIt != attractors.end(); ++atIt, ++i ) {
@@ -2358,7 +2358,7 @@ BLSURFPlugin::TFaceEntryEnfVertexListMap* BLSURFPlugin_Hypothesis_i::GetAllEnfor
 
   const ::BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexListMap faceEntryEnfVertexListMap =
     this->GetImpl()->_GetAllEnforcedVerticesByFace();
-  resultMap->length(faceEntryEnfVertexListMap.size());
+  resultMap->length((CORBA::ULong) faceEntryEnfVertexListMap.size());
 
   ::BLSURFPlugin_Hypothesis::TEnfVertexList _enfVertexList;
   ::BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexListMap::const_iterator it_entry = faceEntryEnfVertexListMap.begin();
@@ -2369,7 +2369,7 @@ BLSURFPlugin::TFaceEntryEnfVertexListMap* BLSURFPlugin_Hypothesis_i::GetAllEnfor
 
     _enfVertexList = it_entry->second;
     BLSURFPlugin::TEnfVertexList_var enfVertexList = new BLSURFPlugin::TEnfVertexList();
-    enfVertexList->length(_enfVertexList.size());
+    enfVertexList->length((CORBA::ULong) _enfVertexList.size());
 
     ::BLSURFPlugin_Hypothesis::TEnfVertexList::const_iterator it_enfVertex = _enfVertexList.begin();
     ::BLSURFPlugin_Hypothesis::TEnfVertex *currentEnfVertex;
@@ -2386,7 +2386,7 @@ BLSURFPlugin::TFaceEntryEnfVertexListMap* BLSURFPlugin_Hypothesis_i::GetAllEnfor
 
       // Coords
       BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
-      coords->length(currentEnfVertex->coords.size());
+      coords->length((CORBA::ULong) currentEnfVertex->coords.size());
       for (CORBA::ULong i=0;i<coords->length();i++)
         coords[i] = currentEnfVertex->coords[i];
       enfVertex->coords = coords;
@@ -2396,7 +2396,7 @@ BLSURFPlugin::TFaceEntryEnfVertexListMap* BLSURFPlugin_Hypothesis_i::GetAllEnfor
       
       // Face entry list
       BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
-      faceEntryList->length(currentEnfVertex->faceEntries.size());
+      faceEntryList->length((CORBA::ULong) currentEnfVertex->faceEntries.size());
       ::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = currentEnfVertex->faceEntries.begin();
       for (int ind = 0; it_entry != currentEnfVertex->faceEntries.end();++it_entry, ++ind)
         faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
@@ -2429,7 +2429,7 @@ BLSURFPlugin::TEnfVertexList* BLSURFPlugin_Hypothesis_i::GetAllEnforcedVertices(
   ASSERT(myBaseImpl);
   BLSURFPlugin::TEnfVertexList_var resultMap = new BLSURFPlugin::TEnfVertexList();
   const ::BLSURFPlugin_Hypothesis::TEnfVertexList enfVertexList = this->GetImpl()->_GetAllEnforcedVertices();
-  resultMap->length(enfVertexList.size());
+  resultMap->length((CORBA::ULong) enfVertexList.size());
 
   ::BLSURFPlugin_Hypothesis::TEnfVertexList::const_iterator evlIt = enfVertexList.begin();
   ::BLSURFPlugin_Hypothesis::TEnfVertex *currentEnfVertex;
@@ -2442,7 +2442,7 @@ BLSURFPlugin::TEnfVertexList* BLSURFPlugin_Hypothesis_i::GetAllEnforcedVertices(
     enfVertex->geomEntry = CORBA::string_dup(currentEnfVertex->geomEntry.c_str());
     // Coords
     BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
-    coords->length(currentEnfVertex->coords.size());
+    coords->length((CORBA::ULong) currentEnfVertex->coords.size());
     for (CORBA::ULong ind = 0; ind < coords->length(); ind++)
       coords[ind] = currentEnfVertex->coords[ind];
     enfVertex->coords = coords;
@@ -2450,7 +2450,7 @@ BLSURFPlugin::TEnfVertexList* BLSURFPlugin_Hypothesis_i::GetAllEnforcedVertices(
     enfVertex->grpName = CORBA::string_dup(currentEnfVertex->grpName.c_str());  
     // Face entry list
     BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
-    faceEntryList->length(currentEnfVertex->faceEntries.size());
+    faceEntryList->length((CORBA::ULong) currentEnfVertex->faceEntries.size());
     ::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = currentEnfVertex->faceEntries.begin();
     for (int ind = 0; it_entry != currentEnfVertex->faceEntries.end();++it_entry, ++ind)
       faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
@@ -2482,7 +2482,7 @@ BLSURFPlugin::TFaceEntryCoordsListMap* BLSURFPlugin_Hypothesis_i::GetAllCoordsBy
   BLSURFPlugin::TFaceEntryCoordsListMap_var resultMap = new BLSURFPlugin::TFaceEntryCoordsListMap();
 
   const ::BLSURFPlugin_Hypothesis::TFaceEntryCoordsListMap entryCoordsListMap = this->GetImpl()->_GetAllCoordsByFace();
-  resultMap->length(entryCoordsListMap.size());
+  resultMap->length((CORBA::ULong) entryCoordsListMap.size());
 
   ::BLSURFPlugin_Hypothesis::TEnfVertexCoordsList _coordsList;
   ::BLSURFPlugin_Hypothesis::TFaceEntryCoordsListMap::const_iterator it_entry = entryCoordsListMap.begin();
@@ -2492,12 +2492,12 @@ BLSURFPlugin::TFaceEntryCoordsListMap* BLSURFPlugin_Hypothesis_i::GetAllCoordsBy
 
     _coordsList = it_entry->second;
     BLSURFPlugin::TEnfVertexCoordsList_var coordsList = new BLSURFPlugin::TEnfVertexCoordsList();
-    coordsList->length(_coordsList.size());
+    coordsList->length((CORBA::ULong) _coordsList.size());
 
     ::BLSURFPlugin_Hypothesis::TEnfVertexCoordsList::const_iterator it_coords = _coordsList.begin();
     for (int j = 0; it_coords != _coordsList.end(); ++it_coords, ++j) {
       BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
-      coords->length((*it_coords).size());
+      coords->length((CORBA::ULong) (*it_coords).size());
       for (CORBA::ULong i=0;i<coords->length();i++)
         coords[i] = (*it_coords)[i];
       coordsList[j] = coords;
@@ -2520,7 +2520,7 @@ BLSURFPlugin::TCoordsEnfVertexMap* BLSURFPlugin_Hypothesis_i::GetAllEnforcedVert
   BLSURFPlugin::TCoordsEnfVertexMap_var resultMap = new BLSURFPlugin::TCoordsEnfVertexMap();
   const ::BLSURFPlugin_Hypothesis::TCoordsEnfVertexMap coordsEnfVertexMap =
     this->GetImpl()->_GetAllEnforcedVerticesByCoords();
-  resultMap->length(coordsEnfVertexMap.size());
+  resultMap->length((CORBA::ULong) coordsEnfVertexMap.size());
 
   ::BLSURFPlugin_Hypothesis::TCoordsEnfVertexMap::const_iterator it_coords = coordsEnfVertexMap.begin();
   ::BLSURFPlugin_Hypothesis::TEnfVertex *currentEnfVertex;
@@ -2528,7 +2528,7 @@ BLSURFPlugin::TCoordsEnfVertexMap* BLSURFPlugin_Hypothesis_i::GetAllEnforcedVert
     currentEnfVertex = (it_coords->second);
     BLSURFPlugin::TCoordsEnfVertexElement_var mapElement = new BLSURFPlugin::TCoordsEnfVertexElement();
     BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
-    coords->length(it_coords->first.size());
+    coords->length((CORBA::ULong) it_coords->first.size());
     for (CORBA::ULong ind=0;ind<coords->length();ind++)
       coords[ind] = it_coords->first[ind];
     mapElement->coords = coords;
@@ -2540,7 +2540,7 @@ BLSURFPlugin::TCoordsEnfVertexMap* BLSURFPlugin_Hypothesis_i::GetAllEnforcedVert
     enfVertex->geomEntry = CORBA::string_dup(currentEnfVertex->geomEntry.c_str());
     // Coords
     BLSURFPlugin::TEnfVertexCoords_var coords2 = new BLSURFPlugin::TEnfVertexCoords();
-    coords2->length(currentEnfVertex->coords.size());
+    coords2->length((CORBA::ULong) currentEnfVertex->coords.size());
     for (CORBA::ULong ind=0;ind<coords2->length();ind++)
       coords2[ind] = currentEnfVertex->coords[ind];
     enfVertex->coords = coords2;
@@ -2548,7 +2548,7 @@ BLSURFPlugin::TCoordsEnfVertexMap* BLSURFPlugin_Hypothesis_i::GetAllEnforcedVert
     enfVertex->grpName = CORBA::string_dup(currentEnfVertex->grpName.c_str());  
     // Face entry list
     BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
-    faceEntryList->length(currentEnfVertex->faceEntries.size());
+    faceEntryList->length((CORBA::ULong) currentEnfVertex->faceEntries.size());
     ::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = currentEnfVertex->faceEntries.begin();
     for (int ind = 0; it_entry != currentEnfVertex->faceEntries.end();++it_entry, ++ind)
       faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
@@ -2581,7 +2581,7 @@ BLSURFPlugin::TFaceEntryEnfVertexEntryListMap* BLSURFPlugin_Hypothesis_i::GetAll
 
   const ::BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexEntryListMap entryEnfVertexEntryListMap =
     this->GetImpl()->_GetAllEnfVertexEntriesByFace();
-  resultMap->length(entryEnfVertexEntryListMap.size());
+  resultMap->length((CORBA::ULong) entryEnfVertexEntryListMap.size());
 
   ::BLSURFPlugin_Hypothesis::TEntryList _enfVertexEntryList;
   ::BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexEntryListMap::const_iterator it_entry =
@@ -2593,7 +2593,7 @@ BLSURFPlugin::TFaceEntryEnfVertexEntryListMap* BLSURFPlugin_Hypothesis_i::GetAll
 
     _enfVertexEntryList = it_entry->second;
     BLSURFPlugin::TEntryList_var enfVertexEntryList = new BLSURFPlugin::TEntryList();
-    enfVertexEntryList->length(_enfVertexEntryList.size());
+    enfVertexEntryList->length((CORBA::ULong) _enfVertexEntryList.size());
 
     ::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_enfVertexEntry = _enfVertexEntryList.begin();
     for (int j = 0; it_enfVertexEntry != _enfVertexEntryList.end(); ++it_enfVertexEntry, ++j) {
@@ -2617,7 +2617,7 @@ BLSURFPlugin::TEnfVertexEntryEnfVertexMap* BLSURFPlugin_Hypothesis_i::GetAllEnfo
   BLSURFPlugin::TEnfVertexEntryEnfVertexMap_var resultMap = new BLSURFPlugin::TEnfVertexEntryEnfVertexMap();
   const ::BLSURFPlugin_Hypothesis::TEnfVertexEntryEnfVertexMap enfVertexEntryEnfVertexMap =
     this->GetImpl()->_GetAllEnforcedVerticesByEnfVertexEntry();
-  resultMap->length(enfVertexEntryEnfVertexMap.size());
+  resultMap->length((CORBA::ULong) enfVertexEntryEnfVertexMap.size());
 
   ::BLSURFPlugin_Hypothesis::TEnfVertexEntryEnfVertexMap::const_iterator it_enfVertexEntry = enfVertexEntryEnfVertexMap.begin();
   ::BLSURFPlugin_Hypothesis::TEnfVertex *currentEnfVertex;
@@ -2633,7 +2633,7 @@ BLSURFPlugin::TEnfVertexEntryEnfVertexMap* BLSURFPlugin_Hypothesis_i::GetAllEnfo
     enfVertex->geomEntry = CORBA::string_dup(currentEnfVertex->geomEntry.c_str());
     // Coords
     BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
-    coords->length(currentEnfVertex->coords.size());
+    coords->length((CORBA::ULong) currentEnfVertex->coords.size());
     for (CORBA::ULong ind=0;ind<coords->length();ind++)
       coords[ind] = currentEnfVertex->coords[ind];
     enfVertex->coords = coords;
@@ -2641,7 +2641,7 @@ BLSURFPlugin::TEnfVertexEntryEnfVertexMap* BLSURFPlugin_Hypothesis_i::GetAllEnfo
     enfVertex->grpName = CORBA::string_dup(currentEnfVertex->grpName.c_str());  
     // Face entry list
     BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
-    faceEntryList->length(currentEnfVertex->faceEntries.size());
+    faceEntryList->length((CORBA::ULong) currentEnfVertex->faceEntries.size());
     ::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = currentEnfVertex->faceEntries.begin();
     for (int ind = 0; it_entry != currentEnfVertex->faceEntries.end();++it_entry, ++ind)
       faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
@@ -3377,7 +3377,7 @@ BLSURFPlugin::TEnfVertexList* BLSURFPlugin_Hypothesis_i::GetEnforcedVerticesEntr
   try {
     BLSURFPlugin::TEnfVertexList_var vertexList = new BLSURFPlugin::TEnfVertexList();
     ::BLSURFPlugin_Hypothesis::TEnfVertexList _vList = this->GetImpl()->GetEnfVertexList(entry);
-    vertexList->length(_vList.size());
+    vertexList->length((CORBA::ULong) _vList.size());
     ::BLSURFPlugin_Hypothesis::TEnfVertexList::const_iterator evlIt = _vList.begin();
     for (int i = 0; evlIt != _vList.end(); ++evlIt, ++i) {
       ::BLSURFPlugin_Hypothesis::TEnfVertex *_enfVertex = (*evlIt);
@@ -3390,7 +3390,7 @@ BLSURFPlugin::TEnfVertexList* BLSURFPlugin_Hypothesis_i::GetEnforcedVerticesEntr
       enfVertex->geomEntry = CORBA::string_dup(_enfVertex->geomEntry.c_str());
       // Coords
       BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
-      coords->length(_enfVertex->coords.size());
+      coords->length((CORBA::ULong) _enfVertex->coords.size());
       for ( CORBA::ULong ind = 0; ind < coords->length(); ind++ )
         coords[ind] = _enfVertex->coords[ind];
       enfVertex->coords = coords;
@@ -3398,7 +3398,7 @@ BLSURFPlugin::TEnfVertexList* BLSURFPlugin_Hypothesis_i::GetEnforcedVerticesEntr
       enfVertex->grpName = CORBA::string_dup(_enfVertex->grpName.c_str());
       // Face entry list
       BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
-      faceEntryList->length(_enfVertex->faceEntries.size());
+      faceEntryList->length((CORBA::ULong) _enfVertex->faceEntries.size());
       ::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = _enfVertex->faceEntries.begin();
       for (int ind = 0; it_entry != _enfVertex->faceEntries.end();++it_entry, ++ind)
         faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
@@ -3658,7 +3658,8 @@ void BLSURFPlugin_Hypothesis_i::CheckShapeTypes(GEOM::GEOM_Object_ptr shape, std
     if (i < theShapeTypes.size()-1 )
       typesTxt << ", ";
   }
-  if (!ok){
+  if (!ok)
+  {
     std::stringstream msg;
     msg << "shape type is not in" << typesTxt.str();
     THROW_SALOME_CORBA_EXCEPTION(msg.str().c_str(), SALOME::BAD_PARAM);
@@ -3760,9 +3761,9 @@ BLSURFPlugin::TPeriodicityList* BLSURFPlugin_Hypothesis_i::PreCadVectorToSequenc
 {
   BLSURFPlugin::TPeriodicityList_var periodicityList = new BLSURFPlugin::TPeriodicityList();
 
-  periodicityList->length(preCadPeriodicityVector.size());
+  periodicityList->length((CORBA::ULong) preCadPeriodicityVector.size());
 
-  for (size_t i = 0; i<preCadPeriodicityVector.size(); i++)
+  for ( CORBA::ULong i = 0; i<preCadPeriodicityVector.size(); i++)
   {
     ::BLSURFPlugin_Hypothesis::TPreCadPeriodicity preCadPeriodicityVector_i = preCadPeriodicityVector[i];
 
@@ -3773,8 +3774,8 @@ BLSURFPlugin::TPeriodicityList* BLSURFPlugin_Hypothesis_i::PreCadVectorToSequenc
     BLSURFPlugin::TEntryList_var sourceVertices = new BLSURFPlugin::TEntryList();
     if (! preCadPeriodicityVector_i.theSourceVerticesEntries.empty())
     {
-      sourceVertices->length(preCadPeriodicityVector_i.theSourceVerticesEntries.size());
-      for (size_t j=0; j<preCadPeriodicityVector_i.theSourceVerticesEntries.size(); j++)
+      sourceVertices->length((CORBA::ULong) preCadPeriodicityVector_i.theSourceVerticesEntries.size());
+      for (CORBA::ULong j=0; j<preCadPeriodicityVector_i.theSourceVerticesEntries.size(); j++)
         sourceVertices[j]=CORBA::string_dup(preCadPeriodicityVector_i.theSourceVerticesEntries[j].c_str());
     }
 
@@ -3783,8 +3784,8 @@ BLSURFPlugin::TPeriodicityList* BLSURFPlugin_Hypothesis_i::PreCadVectorToSequenc
     BLSURFPlugin::TEntryList_var targetVertices = new BLSURFPlugin::TEntryList();
     if (! preCadPeriodicityVector_i.theTargetVerticesEntries.empty())
     {
-      targetVertices->length(preCadPeriodicityVector_i.theTargetVerticesEntries.size());
-      for (size_t j=0; j<preCadPeriodicityVector_i.theTargetVerticesEntries.size(); j++)
+      targetVertices->length((CORBA::ULong) preCadPeriodicityVector_i.theTargetVerticesEntries.size());
+      for (CORBA::ULong j=0; j<preCadPeriodicityVector_i.theTargetVerticesEntries.size(); j++)
         targetVertices[j]=CORBA::string_dup(preCadPeriodicityVector_i.theTargetVerticesEntries[j].c_str());
     }
 
@@ -3830,10 +3831,10 @@ void BLSURFPlugin_Hypothesis_i::AddPreCadFacesPeriodicityWithVertices(GEOM::GEOM
 
   string prefix3 = "Source_vertex_";
   BLSURFPlugin::TEntryList_var theSourceVerticesEntries = new BLSURFPlugin::TEntryList();
-  theSourceVerticesEntries->length(theLength);
+  theSourceVerticesEntries->length((CORBA::ULong) theLength);
   GEOM::GEOM_Object_ptr theVtx_i;
   string theEntry_i;
-  for (size_t ind = 0; ind < theLength; ind++) {
+  for (CORBA::ULong ind = 0; ind < theLength; ind++) {
     theVtx_i = theSourceVertices[ind];
     theEntry_i = PublishIfNeeded(theVtx_i, GEOM::VERTEX, prefix3);
     theSourceVerticesEntries[ind] = CORBA::string_dup(theEntry_i.c_str());
@@ -3841,8 +3842,8 @@ void BLSURFPlugin_Hypothesis_i::AddPreCadFacesPeriodicityWithVertices(GEOM::GEOM
 
   string prefix4 = "Target_vertex_";
   BLSURFPlugin::TEntryList_var theTargetVerticesEntries = new BLSURFPlugin::TEntryList();
-  theTargetVerticesEntries->length(theLength);
-  for (size_t ind = 0; ind < theLength; ind++) {
+  theTargetVerticesEntries->length((CORBA::ULong) theLength);
+  for ( CORBA::ULong  ind = 0; ind < theLength; ind++) {
     theVtx_i = theTargetVertices[ind];
     theEntry_i = PublishIfNeeded(theVtx_i, GEOM::VERTEX, prefix4);
     theTargetVerticesEntries[ind] = CORBA::string_dup(theEntry_i.c_str());
@@ -3865,7 +3866,7 @@ void BLSURFPlugin_Hypothesis_i::AddPreCadFacesPeriodicityEntry(const char* theFa
 
   // Convert BLSURFPlugin::TEntryList to vector<string>
   vector<string> theSourceVerticesEntries, theTargetVerticesEntries;
-  for (size_t ind = 0; ind < theSourceVerticesEntriesCorba.length(); ind++) {
+  for ( CORBA::ULong  ind = 0; ind < theSourceVerticesEntriesCorba.length(); ind++) {
     theSourceVerticesEntries.push_back(theSourceVerticesEntriesCorba[ind].in());
     theTargetVerticesEntries.push_back(theTargetVerticesEntriesCorba[ind].in());
   }
@@ -3918,10 +3919,10 @@ void BLSURFPlugin_Hypothesis_i::AddPreCadEdgesPeriodicityWithVertices(GEOM::GEOM
 
   string prefix3 = "Source_vertex_";
   BLSURFPlugin::TEntryList_var theSourceVerticesEntries = new BLSURFPlugin::TEntryList();
-  theSourceVerticesEntries->length(theLength);
+  theSourceVerticesEntries->length((CORBA::ULong) theLength);
   GEOM::GEOM_Object_ptr theVtx_i;
   string theEntry_i;
-  for (size_t ind = 0; ind < theLength; ind++) {
+  for (CORBA::ULong ind = 0; ind < theLength; ind++) {
     theVtx_i = theSourceVertices[ind];
     theEntry_i = PublishIfNeeded(theVtx_i, GEOM::VERTEX, prefix3);
     theSourceVerticesEntries[ind] = CORBA::string_dup(theEntry_i.c_str());
@@ -3929,8 +3930,8 @@ void BLSURFPlugin_Hypothesis_i::AddPreCadEdgesPeriodicityWithVertices(GEOM::GEOM
 
   string prefix4 = "Target_vertex_";
   BLSURFPlugin::TEntryList_var theTargetVerticesEntries = new BLSURFPlugin::TEntryList();
-  theTargetVerticesEntries->length(theLength);
-  for (size_t ind = 0; ind < theLength; ind++) {
+  theTargetVerticesEntries->length((CORBA::ULong) theLength);
+  for (CORBA::ULong ind = 0; ind < theLength; ind++) {
     theVtx_i = theTargetVertices[ind];
     theEntry_i = PublishIfNeeded(theVtx_i, GEOM::VERTEX, prefix4);
     theTargetVerticesEntries[ind] = CORBA::string_dup(theEntry_i.c_str());
@@ -3954,7 +3955,7 @@ void BLSURFPlugin_Hypothesis_i::AddPreCadEdgesPeriodicityEntry(const char* theEd
 
   // Convert BLSURFPlugin::TEntryList to vector<string>
   vector<string> theSourceVerticesEntries, theTargetVerticesEntries;
-  for (size_t ind = 0; ind < theSourceVerticesEntriesCorba.length(); ind++) {
+  for (CORBA::ULong  ind = 0; ind < theSourceVerticesEntriesCorba.length(); ind++) {
     theSourceVerticesEntries.push_back(theSourceVerticesEntriesCorba[ind].in());
     theTargetVerticesEntries.push_back(theTargetVerticesEntriesCorba[ind].in());
   }
index c064e484a021a7b08f1a0d28372d125e88518831..d8befd68d229570e31752e6f7e7aa6bab69bb1b7 100644 (file)
@@ -1010,8 +1010,8 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame()
   myPeriodicityTreeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
   myPeriodicityTreeWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
   
-  size_t periodicityVisibleColumns = 2;
-  for (size_t column = 0; column < periodicityVisibleColumns; ++column) {
+  int periodicityVisibleColumns = 2;
+  for (int column = 0; column < periodicityVisibleColumns; ++column) {
       myPeriodicityTreeWidget->header()->setSectionResizeMode(column,QHeaderView::Interactive);
       myPeriodicityTreeWidget->resizeColumnToContents(column);
   }
@@ -1299,7 +1299,8 @@ void BLSURFPluginGUI_HypothesisCreator::clearEnforcedVertexWidgets()
     This method updates the tooltip of a modified item. The QLineEdit widgets content
     is synchronized with the coordinates of the enforced vertex clicked in the tree widget.
 */
-void BLSURFPluginGUI_HypothesisCreator::updateEnforcedVertexValues(QTreeWidgetItem* item, int /*column*/) {
+void BLSURFPluginGUI_HypothesisCreator::updateEnforcedVertexValues(QTreeWidgetItem* item, int /*column*/)
+{
   QVariant vertexName = item->data(ENF_VER_NAME_COLUMN, Qt::EditRole);
   QVariant x = item->data(ENF_VER_X_COLUMN, Qt::EditRole);
   QVariant y = item->data(ENF_VER_Y_COLUMN, Qt::EditRole);
@@ -1336,8 +1337,9 @@ void BLSURFPluginGUI_HypothesisCreator::updateEnforcedVertexValues(QTreeWidgetIt
   }
 }
 
-void BLSURFPluginGUI_HypothesisCreator::onSelectEnforcedVertex() {
-  int nbSelEnfVertex = myEnfVertexWdg->NbObjects();
+void BLSURFPluginGUI_HypothesisCreator::onSelectEnforcedVertex()
+{
+  size_t nbSelEnfVertex = myEnfVertexWdg->NbObjects();
   clearEnforcedVertexWidgets();
   if (nbSelEnfVertex == 1)
   {
@@ -1366,7 +1368,8 @@ void BLSURFPluginGUI_HypothesisCreator::onSelectEnforcedVertex() {
 This method synchronizes the QLineEdit/SMESHGUI_SpinBox widgets content with the coordinates
 of the enforced vertex clicked in the tree widget.
 */
-void BLSURFPluginGUI_HypothesisCreator::synchronizeCoords() {
+void BLSURFPluginGUI_HypothesisCreator::synchronizeCoords()
+{
   clearEnforcedVertexWidgets();
   QList<QTreeWidgetItem *> items = myEnforcedTreeWidget->selectedItems();
   if (! items.isEmpty() && items.size() == 1) {
@@ -1393,7 +1396,8 @@ void BLSURFPluginGUI_HypothesisCreator::synchronizeCoords() {
 /** BLSURFPluginGUI_HypothesisCreator::addEnforcedFace(entry, shapeName, useInternalVertices)
 This method adds a face containing enforced vertices in the tree widget.
 */
-QTreeWidgetItem* BLSURFPluginGUI_HypothesisCreator::addEnforcedFace(std::string theFaceEntry, std::string theFaceName) {
+QTreeWidgetItem* BLSURFPluginGUI_HypothesisCreator::addEnforcedFace(std::string theFaceEntry, std::string theFaceName)
+{
   // Find theFaceEntry item
   QList<QTreeWidgetItem* > theItemList = myEnforcedTreeWidget->findItems(QString(theFaceEntry.c_str()),Qt::MatchExactly,ENF_VER_FACE_ENTRY_COLUMN);
   QTreeWidgetItem* theItem;
@@ -1503,7 +1507,7 @@ void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices()
     myEnforcedTreeWidget->resizeColumnToContents(column);
 
   // Vertex selection
-  int selEnfVertex = myEnfVertexWdg->NbObjects();
+  size_t selEnfVertex = myEnfVertexWdg->NbObjects();
   bool coordsEmpty = (myXCoord->text().isEmpty()) || (myYCoord->text().isEmpty()) || (myZCoord->text().isEmpty());
 
   if ((selEnfVertex == 0) && coordsEmpty)
@@ -1537,7 +1541,7 @@ void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices()
 
       CORBA::Double x,y,z;
       x = y = z = 0.;
-      for (int j = 0 ; j < selEnfVertex ; j++)
+      for (size_t j = 0 ; j < selEnfVertex ; j++)
       {
         myEnfVertex = myEnfVertexWdg->GetObject< GEOM::GEOM_Object >(j);
         if (myEnfVertex->GetShapeType() == GEOM::VERTEX) {
@@ -1565,7 +1569,8 @@ void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices()
 /** BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex()
 This method is called when a item is removed from the enforced vertices tree widget
 */
-void BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex() {
+void BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex()
+{
   QList<QTreeWidgetItem *> selectedItems = myEnforcedTreeWidget->selectedItems();
   QList<QTreeWidgetItem *> selectedVertices;
   QSet<QTreeWidgetItem *> selectedEntries;
@@ -1612,8 +1617,8 @@ void BLSURFPluginGUI_HypothesisCreator::onInternalVerticesClicked(int state)
 /** BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity()
 This method is called when a item is added into the periodicity table widget
 */
-void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() {
-
+void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity()
+{
   BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
 
   that->getGeomSelectionTool()->selectionMgr()->clearFilters();
@@ -1626,8 +1631,8 @@ void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() {
 
 
   // Source-Target selection
-  int selSource = myPeriodicitySourceFaceWdg->NbObjects();
-  int selTarget = myPeriodicityTargetFaceWdg->NbObjects();
+  size_t selSource = myPeriodicitySourceFaceWdg->NbObjects();
+  size_t selTarget = myPeriodicityTargetFaceWdg->NbObjects();
 
   if (selSource == 0 || selTarget == 0)
     return;
@@ -1635,12 +1640,12 @@ void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() {
   // Vertices selection
   if (myPeriodicityGroupBox2->isChecked())
     {
-      int P1Ssel = myPeriodicityP1SourceWdg->NbObjects();
-      int P2Ssel = myPeriodicityP2SourceWdg->NbObjects();
-      int P3Ssel = myPeriodicityP3SourceWdg->NbObjects();
-      int P1Tsel = myPeriodicityP1TargetWdg->NbObjects();
-      //int P2Tsel = myPeriodicityP2TargetWdg->NbObjects();
-      int P3Tsel = myPeriodicityP3TargetWdg->NbObjects();
+      size_t P1Ssel = myPeriodicityP1SourceWdg->NbObjects();
+      size_t P2Ssel = myPeriodicityP2SourceWdg->NbObjects();
+      size_t P3Ssel = myPeriodicityP3SourceWdg->NbObjects();
+      size_t P1Tsel = myPeriodicityP1TargetWdg->NbObjects();
+      //size_t P2Tsel = myPeriodicityP2TargetWdg->NbObjects();
+      size_t P3Tsel = myPeriodicityP3TargetWdg->NbObjects();
 
       if (P1Ssel!=1 || P2Ssel!=1 || P3Ssel!=1 || P1Tsel!=1 || P3Tsel!=1 || P3Tsel!=1)
         {
@@ -1661,7 +1666,7 @@ void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() {
   item->setFlags( Qt::ItemIsSelectable   |Qt::ItemIsEnabled );
 
 
-  size_t k=0;
+  int k=0;
   for (anIt = myPeriodicitySelectionWidgets.begin(); anIt != myPeriodicitySelectionWidgets.end(); anIt++, k++)
     {
       StdMeshersGUI_ObjectReferenceParamWdg * w1 = ( StdMeshersGUI_ObjectReferenceParamWdg* ) ( *anIt );
@@ -1693,7 +1698,8 @@ void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() {
 /** BLSURFPluginGUI_HypothesisCreator::onRemovePeriodicity()
 This method is called when a item is removed from the periodicity tree widget
 */
-void BLSURFPluginGUI_HypothesisCreator::onRemovePeriodicity() {
+void BLSURFPluginGUI_HypothesisCreator::onRemovePeriodicity()
+{
   QList<QTreeWidgetItem *> selectedItems = myPeriodicityTreeWidget->selectedItems();
   QTreeWidgetItem* item;
 
@@ -1745,7 +1751,7 @@ void BLSURFPluginGUI_HypothesisCreator::onPeriodicityTreeClicked(QTreeWidgetItem
 {
   QString shapeName, shapeEntry;
   CORBA::Object_var shape;
-  size_t k=0;
+  int k=0;
   ListOfWidgets::const_iterator anIt = myPeriodicitySelectionWidgets.begin();
   for (; anIt != myPeriodicitySelectionWidgets.end(); anIt++, k++)
     {
@@ -2013,8 +2019,8 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const
     {
       string shapeEntry = periodicity_i[k];
       string shapeName = myGeomToolSelected->getNameFromEntry(shapeEntry);
-      item->setData(k, Qt::EditRole, shapeName.c_str() );
-      item->setData(k, Qt::UserRole, shapeEntry.c_str() );
+      item->setData((int) k, Qt::EditRole, shapeName.c_str() );
+      item->setData((int) k, Qt::UserRole, shapeEntry.c_str() );
     }
   }
 
@@ -2128,7 +2134,7 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData
     fullSizeMapList = fullSizeMaps.split( "|", QString::KeepEmptyParts );
     if ( fullSizeMapList.count() > 1 ) {
       string fullSizeMap = fullSizeMapList[1].toStdString();
-      int pos = fullSizeMap.find("return")+7;
+      size_t pos = fullSizeMap.find("return")+7;
       QString sizeMap;
       try {
         sizeMap = QString::fromStdString(fullSizeMap.substr(pos, fullSizeMap.size()-pos));
@@ -2270,7 +2276,7 @@ void BLSURFPluginGUI_HypothesisCreator::AddPreCadSequenceToVector(BlsurfHypothes
     BLSURFPlugin::TPeriodicityList_var preCadFacePeriodicityVector, bool onFace) const
 {
 
-  for (size_t i=0; i<preCadFacePeriodicityVector->length(); i++ )
+  for (CORBA::ULong i=0; i<preCadFacePeriodicityVector->length(); i++ )
     {
       TPreCadPeriodicity periodicity_i(PERIODICITY_NB_COLUMN);
       periodicity_i[PERIODICITY_OBJ_SOURCE_COLUMN] = preCadFacePeriodicityVector[i].shape1Entry.in();
@@ -2355,11 +2361,11 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi
     if ( h->GetVolumeGradation() !=  h_data.myVolumeGradation )
       h->SetVolumeGradation( h_data.myVolumeGradation <= 0 ? -1 : h_data.myVolumeGradation );
 
-    h->SetSurfaceProximity        ( h_data.myUseSurfaceProximity      );
-    h->SetNbSurfaceProximityLayers( h_data.myNbSurfaceProximityLayers );
+    h->SetSurfaceProximity        ((CORBA::Short) h_data.myUseSurfaceProximity      );
+    h->SetNbSurfaceProximityLayers((CORBA::Short) h_data.myNbSurfaceProximityLayers );
     h->SetSurfaceProximityRatio   ( h_data.mySurfaceProximityRatio    );
-    h->SetVolumeProximity         ( h_data.myUseVolumeProximity       );
-    h->SetNbVolumeProximityLayers ( h_data.myNbVolumeProximityLayers  );
+    h->SetVolumeProximity         ((CORBA::Short) h_data.myUseVolumeProximity       );
+    h->SetNbVolumeProximityLayers ((CORBA::Short) h_data.myNbVolumeProximityLayers  );
     h->SetVolumeProximityRatio    ( h_data.myVolumeProximityRatio     );
 
     if ( h->GetElementType() != h_data.myElementType )
@@ -2403,7 +2409,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi
       h->SetQuadraticMesh( h_data.myQuadraticMesh );
 
     if ( h->GetVerbosity() != h_data.myVerbosity )
-      h->SetVerbosity( h_data.myVerbosity );
+      h->SetVerbosity((CORBA::Short) h_data.myVerbosity );
     // if ( h->GetTopology() != h_data.myTopology )
     //   h->SetTopology( (int) h_data.myTopology );
     // if ( h->GetPreCADMergeEdges() != h_data.myPreCADMergeEdges )
@@ -2809,7 +2815,7 @@ void BLSURFPluginGUI_HypothesisCreator::onMapGeomContentModified()
 }
 
 void BLSURFPluginGUI_HypothesisCreator::onSmpItemClicked(QTreeWidgetItem * item, int col)
-{ 
+{
   BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
   if (col == SMP_SIZEMAP_COLUMN) {
     QString entry   = item->data( SMP_ENTRY_COLUMN, Qt::EditRole ).toString();
@@ -2833,7 +2839,7 @@ void BLSURFPluginGUI_HypothesisCreator::onSmpItemClicked(QTreeWidgetItem * item,
       const TAttractorVec& attVec = myATTMap[entry];
       if ( !attVec.empty() )
       {
-        int iAtt = 0;
+        size_t iAtt = 0;
         if ( !childEntry.isEmpty() )
           for ( size_t i = 0; i < attVec.size(); ++i )
             if ( childEntry == attVec[i].attEntry.c_str() )
index 2cf2c116eaf35c6ff8b88be013c68f5f11afbd8e..24e8681ddc6bcfc1256cd24d0ac1bcee1147a730 100644 (file)
@@ -170,7 +170,7 @@ typedef struct
   double  myAnisotropicRatio, myTinyEdgeLength, myTinyEdgeOptimisLength, myBadElementAspectRatio, myCorrectSurfaceIntersectionMaxCost;
   bool    myOptimizeMesh, myQuadraticMesh;
   bool    mySmpsurface,mySmpedge,mySmppoint,myEnforcedVertex,myInternalEnforcedVerticesAllFaces;
-  long    myElementType;
+  int     myElementType;
   bool    myUseSurfaceProximity;
   int     myNbSurfaceProximityLayers;
   double  mySurfaceProximityRatio;