]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
minor change
authoreap <eap@opencascade.com>
Thu, 8 Oct 2009 13:48:26 +0000 (13:48 +0000)
committereap <eap@opencascade.com>
Thu, 8 Oct 2009 13:48:26 +0000 (13:48 +0000)
src/NETGENPlugin/NETGENPlugin_Mesher.cxx

index 87d5adeb9771fe6bae138ed1a7d3cc2cc33bb370..9268b866ddb4e686bfed8be12866247125077ee1 100644 (file)
@@ -622,13 +622,10 @@ bool NETGENPlugin_Mesher::Compute()
           // length from edges
           double length = 0;
           TopTools_MapOfShape tmpMap;
-          for ( TopExp_Explorer exp( _shape, TopAbs_EDGE ); exp.More(); exp.Next() ) {
-            if( tmpMap.Contains(exp.Current()) )
-              continue;
-            length += SMESH_Algo::EdgeLength( TopoDS::Edge( exp.Current() ));
-            tmpMap.Add(exp.Current());
-          }
-          tmpMap.Clear();
+          for ( TopExp_Explorer exp( _shape, TopAbs_EDGE ); exp.More(); exp.Next() )
+            if( tmpMap.Add(exp.Current()) )
+              length += SMESH_Algo::EdgeLength( TopoDS::Edge( exp.Current() ));
+
           if ( ngMesh->GetNSeg() ) {
             // we have to multiply length by 2 since for each TopoDS_Edge there
             // are double set of NETGEN edges or, in other words, we have to