73 int main(
int argc,
char *argv[])
91 Info<<
"Looking for nearest face/vertex to " << samplePt <<
endl;
101 const pointField& localPoints = surf1.localPoints();
104 scalar minDist = GREAT;
106 forAll(localPoints, pointI)
108 const scalar
dist =
mag(localPoints[pointI] - samplePt);
116 Info<<
"Nearest vertex:" << endl
117 <<
" index :" << minIndex <<
" (in localPoints)" << endl
118 <<
" index :" << surf1.meshPoints()[minIndex]
119 <<
" (in points)" << endl
120 <<
" coordinates:" << localPoints[minIndex] << endl
137 const scalar dist =
mag(centre - samplePt);
147 Info<<
"Face with nearest centre:" << endl
148 <<
" index :" << minIndex << endl
149 <<
" centre :" << f.
centre(points) << endl
150 <<
" face :" << f << endl
151 <<
" vertex coords:" << points[f[0]] <<
" "
152 << points[f[1]] <<
" " << points[f[2]] << endl