From 83d81b7441094e0bed754af3e6c37ab8b5d7155f Mon Sep 17 00:00:00 2001 From: laurence Date: Tue, 24 Jan 2012 12:48:38 +0000 Subject: [PATCH] ENH: cvMesh: Dynamic tree added for surface points. Now there is a search for the surface points to check whether they are close to any other surface point. If they are, reject the point unless the angle between the normals of the surfaces are around 180 degrees, which means that the points are close but on opposite surfaces (i.e. there is a small gap). --- .../conformalVoronoiMesh.H | 15 +- .../conformalVoronoiMeshConformToSurface.C | 190 ++++++++++++++---- .../conformalVoronoiMeshIO.C | 2 +- .../conformationSurfaces.C | 1 + 4 files changed, 165 insertions(+), 43 deletions(-) diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H index 0ac85c61dd..2e38a504e1 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H @@ -658,6 +658,17 @@ private: label callCount = 0 ) const; + //- Find angle between the normals of two close surface points. + scalar angleBetweenSurfacePoints(Foam::point pA, Foam::point pB) const; + + //- Check if a surface point is near another. + bool nearSurfacePoint + ( + const pointIndexHit& pHit, + DynamicList& existingSurfacePtLocations, + dynamicIndexedOctree& surfacePtLocationTree + ) const; + //- Check if a location is in the exclusion range of an existing feature //- edge conformation location bool nearFeatureEdgeLocation @@ -694,7 +705,9 @@ private: DynamicList