From 4a9ffe08f761dab67768c4eaf8734d399f9d8664 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 8 Oct 2009 13:48:26 +0000 Subject: [PATCH] minor change --- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 87d5ade..9268b86 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -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 -- 2.39.2