ENH: foamyHexMesh: Do not insert surface points near edge points

This commit is contained in:
laurence
2013-09-26 12:08:28 +01:00
parent afa5658713
commit aebfc3c75f
3 changed files with 28 additions and 1 deletions

View File

@ -354,6 +354,28 @@ bool Foam::conformalVoronoiMesh::nearFeaturePt(const Foam::point& pt) const
} }
bool Foam::conformalVoronoiMesh::surfacePtNearFeatureEdge
(
const Foam::point& pt
) const
{
scalar exclusionRangeSqr = surfacePtExclusionDistanceSqr(pt);
pointIndexHit info;
label featureHit;
geometryToConformTo_.findEdgeNearest
(
pt,
exclusionRangeSqr,
info,
featureHit
);
return info.hit();
}
void Foam::conformalVoronoiMesh::insertInitialPoints() void Foam::conformalVoronoiMesh::insertInitialPoints()
{ {
Info<< nl << "Inserting initial points" << endl; Info<< nl << "Inserting initial points" << endl;

View File

@ -351,6 +351,9 @@ private:
//- Check if a location is in exclusion range around a feature point //- Check if a location is in exclusion range around a feature point
bool nearFeaturePt(const Foam::point& pt) const; bool nearFeaturePt(const Foam::point& pt) const;
//- Check if a surface point is in exclusion range around a feature edge
bool surfacePtNearFeatureEdge(const Foam::point& pt) const;
//- Insert the initial points into the triangulation, based on the //- Insert the initial points into the triangulation, based on the
// initialPointsMethod // initialPointsMethod
void insertInitialPoints(); void insertInitialPoints();

View File

@ -2057,9 +2057,11 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits
bool isNearFeaturePt = nearFeaturePt(surfPt); bool isNearFeaturePt = nearFeaturePt(surfPt);
bool isNearFeatureEdge = surfacePtNearFeatureEdge(surfPt);
bool isNearSurfacePt = nearSurfacePoint(surfHitI); bool isNearSurfacePt = nearSurfacePoint(surfHitI);
if (isNearFeaturePt || isNearSurfacePt) if (isNearFeaturePt || isNearSurfacePt || isNearFeatureEdge)
{ {
keepSurfacePoint = false; keepSurfacePoint = false;
} }