From 138f149b47eca977215ad7387134d8c7f080398c Mon Sep 17 00:00:00 2001 From: laurence Date: Tue, 20 Mar 2012 17:43:27 +0000 Subject: [PATCH] ENH: surfaceFeatures: Add constructor that takes an edgeMesh --- .../algorithms/indexedOctree/indexedOctree.C | 6 +- .../surfaceFeatures/surfaceFeatures.C | 261 ++++++++++++++---- .../surfaceFeatures/surfaceFeatures.H | 35 ++- 3 files changed, 243 insertions(+), 59 deletions(-) diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C index 024f7d27ec..f16dd2595c 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C @@ -2832,7 +2832,7 @@ Foam::pointIndexHit Foam::indexedOctree::findNearest ) const { label nearestShapeI = -1; - point nearestPoint; + point nearestPoint = vector::zero; if (nodes_.size()) { @@ -2847,10 +2847,6 @@ Foam::pointIndexHit Foam::indexedOctree::findNearest nearestPoint ); } - else - { - nearestPoint = vector::zero; - } return pointIndexHit(nearestShapeI != -1, nearestPoint, nearestShapeI); } diff --git a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C index e39eae5704..465734ff87 100644 --- a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C +++ b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C @@ -33,11 +33,15 @@ License #include "OFstream.H" #include "IFstream.H" #include "unitConversion.H" +#include "EdgeMap.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(Foam::surfaceFeatures, 0); +const Foam::scalar Foam::surfaceFeatures::parallelTolerance = + sin(degToRad(1.0)); + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -170,7 +174,10 @@ void Foam::surfaceFeatures::setFromStatus(const List& edgeStat) //construct feature points where more than 2 feature edges meet -void Foam::surfaceFeatures::calcFeatPoints(const List& edgeStat) +void Foam::surfaceFeatures::calcFeatPoints +( + const List& edgeStat +) { DynamicList