Go to the documentation of this file.
74 info.setPoint(start+t*l.vec());
87 if (
mag(normal()[dir]) - 1 < SMALL)
101 Foam::searchablePlane::searchablePlane
104 const point& basePoint,
109 plane(basePoint, normal)
111 bounds() = calcBounds();
115 Foam::searchablePlane::searchablePlane
124 bounds() = calcBounds();
132 if (regions_.empty())
135 regions_[0] =
"region0";
150 centres[0] = origin();
166 info[i].setPoint(nearestPoint(
samples[i]));
168 if (
magSqr(
samples[i]-info[i].rawPoint()) > nearestDistSqr[i])
170 info[i].setIndex(-1);
182 void Foam::searchablePlane::findLine
193 info[i] = findLine(start[i],
end[i]);
205 findLine(start,
end, info);
217 findLine(start,
end, nearestInfo);
222 if (nearestInfo[pointi].hit())
225 info[pointi][0] = nearestInfo[pointi];
229 info[pointi].
clear();
252 n.setSize(info.size());
264 <<
"Volume type not supported for plane."
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual void getVolumeType(const pointField &, List< volumeType > &) const
Determine type (inside/outside/mixed) for point.
static constexpr const zero Zero
Global zero (0)
InfoProxy< IOobject > info() const
Return info proxy.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
virtual void boundingSpheres(pointField ¢res, scalarField &radiusSqr) const
Get bounding spheres (centre and radius squared), one per element.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
scalarField samples(nIntervals, Zero)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
scalar lineIntersect(const line< Point, PointRef > &l) const
Return the cutting point between the plane and.
Macros for easy insertion into run-time selection tables.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
errorManipArg< error, int > exit(error &err, const int errNo=1)
line< point, const point & > linePointRef
A line using referred points.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
PointIndexHit< point > pointIndexHit
A PointIndexHit for 3D points.
static const boundBox greatBox
A large boundBox: min/max == -/+ ROOTVGREAT.
virtual const wordList & regions() const
Names of regions.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void clear()
Clear the list, i.e. set size to zero.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
A bounding box defined in terms of min/max extrema points.
vector point
Point is a vector.
void setSize(const label newSize)
Alias for resize(const label)
defineTypeNameAndDebug(combustionModel, 0)
virtual void findLineAny(const pointField &start, const pointField &end, List< pointIndexHit > &) const
Return any intersection on segment from start to end.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit >> &) const
Get all intersections in order from start to end.
static constexpr direction nComponents
Number of components in this vector space.