From: ptv Date: Tue, 25 Aug 2009 05:19:06 +0000 (+0000) Subject: 0019296: EDF 681 SMESH - Pre-evaluation of the number of elements before mesh X-Git-Tag: V5_1_3rc1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=43913f42458bd9b4538944c404a7713cc5e768a3;p=plugins%2Fblsurfplugin.git 0019296: EDF 681 SMESH - Pre-evaluation of the number of elements before mesh Replace hard coded values of element types by new enumeration (added in advanced mesh info Improvement) --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index ca2fc05..f4901ac 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -1228,15 +1228,15 @@ bool BLSURFPlugin_BLSURF::Evaluate(SMESH_Mesh& aMesh, nb1d = (int)( fullAng/_angleMeshC + 1 ); } fullNbSeg += nb1d; - std::vector aVec(17); - for(int i=0; i<17; i++) aVec[i]=0; + std::vector aVec(SMDSEntity_Last); + for(int i=SMDSEntity_Node; i 0 ) { - aVec[0] = 2*nb1d - 1; - aVec[2] = nb1d; + aVec[SMDSEntity_Node] = 2*nb1d - 1; + aVec[SMDSEntity_Quad_Edge] = nb1d; } else { - aVec[0] = nb1d - 1; - aVec[1] = nb1d; + aVec[SMDSEntity_Node] = nb1d - 1; + aVec[SMDSEntity_Edge] = nb1d; } aResMap.insert(std::make_pair(sm,aVec)); EdgesMap.Bind(E,nb1d); @@ -1258,16 +1258,16 @@ bool BLSURFPlugin_BLSURF::Evaluate(SMESH_Mesh& aMesh, } 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; + std::vector aVec(SMDSEntity_Last); + for(int i=SMDSEntity_Node; i aVec(17); - for(int i=0; i<17; i++) aVec[i]=0; + std::vector aVec(SMDSEntity_Last); + for(int i=SMDSEntity_Node; i