BUG: extendedFeatureEdgeMesh: Return a miss if a edge end is the nearest hit

This commit is contained in:
laurence
2012-03-01 17:24:37 +00:00
parent fd953175e0
commit fbc77c4c73
2 changed files with 47 additions and 2 deletions

View File

@ -285,7 +285,9 @@ public:
) const;
//- Find the nearest points on each feature edge that is within
// a given distance from the sample point
// a given distance from the sample point. Will need to check for
// a hit or a miss because near edges may not have a nearest point
// on them which is perpendicular to the sample point.
void findAllNearestEdges
(
const point& sample,

View File

@ -546,6 +546,49 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
}
featurePointNormals_ = featurePointNormals;
// Create featurePointEdges_
// For each feature point, stores a list of edges which are arranged in
// order according to their connectivity
// featurePointEdges_.setSize(nonFeatureStart_);
//
// Info<< sFeatEds.size() << " " << surf.pointEdges().size() << " "
// << edges().size() << endl;
//
// forAll(sFeatEds, eI)
// {
// Info<< "Edge " << eI << " " << sFeatEds[eI] << " "
// << edges()[eI] << endl;
// }
//
// const edgeList& edges = eds;
//
// for (label i = 0; i < nonFeatureStart_; i++)
// {
// const labelList& ptEds = surf.pointEdges()[i];
//
// DynamicList<label> tmpFtEdges;
//
// forAll(ptEds, eI)
// {
// const label edgeI = ptEds[eI];
// const edge& e = sFeatEds[edgeI];
//
// Info<< "Edges: " << edgeI << " " << e << endl;
//
// forAll(sFeatEds, fEdgeI)
// {
// if (edges[fEdgeI] == e)
// {
// tmpFtEdges.append(fEdgeI);
// }
// }
// }
//
// featurePointEdges_[i] = tmpFtEdges;
// }
}
@ -821,7 +864,7 @@ void Foam::extendedFeatureEdgeMesh::allNearestFeatureEdges
if (!hitPoint.hit())
{
nearHit = pointIndexHit(true, hitPoint.missPoint(), hitIndex);
nearHit = pointIndexHit(false, hitPoint.missPoint(), hitIndex);
}
else
{