ENH: Check if surface conformation point is inside the surface geometry

This commit is contained in:
laurence
2013-04-11 20:18:50 +01:00
parent 1804fb2813
commit 8ae926c472
2 changed files with 7 additions and 11 deletions

View File

@ -599,7 +599,7 @@ private:
pointIndexHitAndFeatureList& surfaceHits pointIndexHitAndFeatureList& surfaceHits
); );
bool locationConformsToInside bool surfaceLocationConformsToInside
( (
const pointIndexHitAndFeature& info const pointIndexHitAndFeature& info
) const; ) const;

View File

@ -808,13 +808,11 @@ Foam::label Foam::conformalVoronoiMesh::synchroniseEdgeTrees
} }
bool Foam::conformalVoronoiMesh::locationConformsToInside bool Foam::conformalVoronoiMesh::surfaceLocationConformsToInside
( (
const pointIndexHitAndFeature& info const pointIndexHitAndFeature& info
) const ) const
{ {
bool keepLocation = true;
if (info.first().hit()) if (info.first().hit())
{ {
vectorField norm(1); vectorField norm(1);
@ -833,15 +831,13 @@ bool Foam::conformalVoronoiMesh::locationConformsToInside
if (!geometryToConformTo_.inside(innerPoint)) if (!geometryToConformTo_.inside(innerPoint))
{ {
keepLocation = false; return false;
} }
}
else return true;
{
keepLocation = false;
} }
return keepLocation; return false;
} }
@ -995,7 +991,7 @@ bool Foam::conformalVoronoiMesh::dualCellSurfaceAllIntersections
bool rejectPoint = false; bool rejectPoint = false;
if (!locationConformsToInside(info)) if (!surfaceLocationConformsToInside(info))
{ {
rejectPoint = true; rejectPoint = true;
} }