From 5e693642e7a3ce75a7146a9758424131c255eae9 Mon Sep 17 00:00:00 2001 From: graham Date: Thu, 4 Nov 2010 16:48:44 +0000 Subject: [PATCH] ENH: Adding length and presence of current edge to filtering calculation to allow long, single edges to be kept. --- .../triSurface/surfaceFeatures/surfaceFeatures.C | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C index 3cbe1157a9..ea326b0aca 100644 --- a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C +++ b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C @@ -620,13 +620,23 @@ void Foam::surfaceFeatures::trimFeatures if ( - (leftPath.len_ + rightPath.len_ < minLen) - || (leftPath.n_ + rightPath.n_ < minElems) + ( + leftPath.len_ + + rightPath.len_ + + startEdge.mag(surf_.localPoints()) + < minLen + ) + || (leftPath.n_ + rightPath.n_ + 1 < minElems) ) { // Rewalk same route (recognizable by featLines == featI) // to reset featLines. + Info<< "In too small case:" << startEdgeI + << nl << leftPath.len_ << " " << rightPath.len_ + << nl << leftPath.n_ << " " << rightPath.n_ + << endl; + featLines[startEdgeI] = -2; walkSegment