49 surfaceToPoint::typeName,
50 "\n Usage: surfaceToPoint <surface> <near> <inside> <outside>\n\n"
51 " <surface> name of triSurface\n"
52 " <near> scalar; include points with coordinate <= near to surface\n"
53 " <inside> boolean; whether to include points on opposite side of"
55 " <outside> boolean; whether to include points on this side of"
62 void Foam::surfaceToPoint::combine(topoSet&
set,
const bool add)
const
66 triSurface surf(surfName_);
68 Info<<
" Read surface from " << surfName_
69 <<
" in = "<< timer.cpuTimeIncrement() <<
" s" <<
endl <<
endl;
72 triSurfaceSearch querySurf(surf);
74 if (includeInside_ || includeOutside_)
78 forAll(pointInside, pointI)
80 bool isInside = pointInside[pointI];
82 if ((isInside && includeInside_) || (!isInside && includeOutside_))
94 const vector span(nearDist_, nearDist_, nearDist_);
98 const point& pt = meshPoints[pointI];
102 if (inter.hit() && (
mag(inter.hitPoint() - pt) < nearDist_))
111 void Foam::surfaceToPoint::checkSettings()
const
113 if (nearDist_ < 0 && !includeInside_ && !includeOutside_)
116 <<
"Illegal point selection specification."
117 <<
" Result would be either all or no points." << endl
118 <<
"Please set one of includeInside or includeOutside"
119 <<
" to true, set nearDistance to a value > 0"
132 const scalar nearDist,
133 const bool includeInside,
134 const bool includeOutside
140 includeInside_(includeInside),
141 includeOutside_(includeOutside)
155 surfName_(dict.
lookup(
"file")),
172 surfName_(checkIs(is)),
174 includeInside_(
readBool(checkIs(is))),
175 includeOutside_(
readBool(checkIs(is)))
197 Info<<
" Adding points in relation to surface " << surfName_
204 Info<<
" Removing points in relation to surface " << surfName_