Salome HOME
Fix compilation problem on Debian Sarge
authormaintenance team <salome-mnt@opencascade.com>
Fri, 10 Jul 2009 06:26:38 +0000 (06:26 +0000)
committermaintenance team <salome-mnt@opencascade.com>
Fri, 10 Jul 2009 06:26:38 +0000 (06:26 +0000)
src/NETGENPlugin/NETGENPlugin_Mesher.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx

index 178a1684a952162a424dd3ecf9085c0eabc668b1..6f95ba3de544f5fc1cf1cc0fcd9d2fd7ddd7c396 100644 (file)
@@ -1019,7 +1019,7 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap)
     fullLen += aLen;
     int nb1d = nbs;
     if(nb1d==0) {
-       nb1d = (int)aLen/mparams.maxh + 1;
+       nb1d = (int)( aLen/mparams.maxh + 1 );
     }
     fullNbSeg += nb1d;
     std::vector<int> aVec(17);
@@ -1062,8 +1062,8 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap)
     for (TopExp_Explorer exp1(F,TopAbs_EDGE); exp1.More(); exp1.Next()) {
       nb1d += EdgesMap.Find(exp1.Current());
     }
-    int nbFaces = (int) anArea/(mparams.maxh*mparams.maxh*sqrt(3)/4);
-    int nbNodes = (int) ( nbFaces*3 - (nb1d-1)*2 ) / 6 + 1;
+    int nbFaces = (int) ( anArea / ( mparams.maxh*mparams.maxh*sqrt(3.) / 4 ) );
+    int nbNodes = (int) ( ( nbFaces*3 - (nb1d-1)*2 ) / 6 + 1 );
     std::vector<int> aVec(17);
     for(int i=0; i<17; i++) aVec[i]=0;
     if( mparams.secondorder > 0 ) {
index 838d0170fc80a13a5a58a2f986bdd40500ae5876..1bc4ec5975b978dd28709965065e78f0eba63c80 100644 (file)
@@ -496,8 +496,8 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Evaluate(SMESH_Mesh& aMesh,
   GProp_GProps G;
   BRepGProp::SurfaceProperties(F,G);
   double anArea = G.Mass();
-  int nbFaces = (int) anArea/(ELen*ELen*sqrt(3)/4);
-  int nbNodes = (int) ( nbFaces*3 - (nb1d-1)*2 ) / 6 + 1;
+  int nbFaces = (int) ( anArea / ( ELen*ELen*sqrt(3.) / 4 ) );
+  int nbNodes = (int) ( ( nbFaces*3 - (nb1d-1)*2 ) / 6 + 1 );
   std::vector<int> aVec(17);
   for(int i=0; i<17; i++) aVec[i]=0;
   if( IsQuadratic ) {