From fa15077ca0954472874435c35b871831d5f3c549 Mon Sep 17 00:00:00 2001 From: maintenance team Date: Fri, 10 Jul 2009 06:26:38 +0000 Subject: [PATCH] Fix compilation problem on Debian Sarge --- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 6 +++--- src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 178a168..6f95ba3 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -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 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 aVec(17); for(int i=0; i<17; i++) aVec[i]=0; if( mparams.secondorder > 0 ) { diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx index 838d017..1bc4ec5 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx @@ -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 aVec(17); for(int i=0; i<17; i++) aVec[i]=0; if( IsQuadratic ) { -- 2.39.2