triSurfaceSearch Class Reference

Helper class to search on triSurface. More...

Inheritance diagram for triSurfaceSearch:
[legend]

Public Member Functions

 triSurfaceSearch (const triSurface &surface)
 Construct from surface. Holds reference to surface! More...
 
 triSurfaceSearch (const triSurface &surface, const dictionary &dict)
 Construct from surface and dictionary. More...
 
 triSurfaceSearch (const triSurface &surface, const scalar tolerance, const label maxTreeDepth=10)
 Construct from components. More...
 
 ~triSurfaceSearch ()
 Destructor. More...
 
void clearOut ()
 Clear storage. More...
 
const indexedOctree< treeDataTriSurface > & tree () const
 Demand driven construction of the octree. More...
 
const triSurfacesurface () const
 Return reference to the surface. More...
 
scalar tolerance () const
 Return tolerance to use in searches. More...
 
label maxTreeDepth () const
 Return max tree depth of octree. More...
 
boolList calcInside (const pointField &searchPoints) const
 Calculate for each searchPoint inside/outside status. More...
 
void findNearest (const pointField &samples, const scalarField &nearestDistSqr, List< pointIndexHit > &info) const
 
pointIndexHit nearest (const point &pt, const vector &span) const
 Calculate nearest point on surface for single searchPoint. Returns. More...
 
void findLine (const pointField &start, const pointField &end, List< pointIndexHit > &info) const
 
void findLineAny (const pointField &start, const pointField &end, List< pointIndexHit > &info) const
 
void findLineAll (const pointField &start, const pointField &end, List< List< pointIndexHit > > &info) const
 Calculate all intersections from start to end. More...
 

Detailed Description

Helper class to search on triSurface.

Source files

Definition at line 58 of file triSurfaceSearch.H.

Constructor & Destructor Documentation

◆ triSurfaceSearch() [1/3]

triSurfaceSearch ( const triSurface surface)
explicit

Construct from surface. Holds reference to surface!

Definition at line 136 of file triSurfaceSearch.C.

◆ triSurfaceSearch() [2/3]

triSurfaceSearch ( const triSurface surface,
const dictionary dict 
)

Construct from surface and dictionary.

Definition at line 145 of file triSurfaceSearch.C.

References dict, Foam::endl(), Foam::Info, and dictionary::readIfPresent().

Here is the call graph for this function:

◆ triSurfaceSearch() [3/3]

triSurfaceSearch ( const triSurface surface,
const scalar  tolerance,
const label  maxTreeDepth = 10 
)

Construct from components.

A invalid (negative) tolerance uses the default tolerance.

Definition at line 170 of file triSurfaceSearch.C.

References indexedOctree< Type >::perturbTol().

Here is the call graph for this function:

◆ ~triSurfaceSearch()

Destructor.

Definition at line 191 of file triSurfaceSearch.C.

Member Function Documentation

◆ clearOut()

void clearOut ( )

Clear storage.

Definition at line 197 of file triSurfaceSearch.C.

Referenced by triSurfaceRegionSearch::clearOut().

Here is the caller graph for this function:

◆ tree()

const Foam::indexedOctree< Foam::treeDataTriSurface > & tree ( ) const

Demand driven construction of the octree.

Definition at line 206 of file triSurfaceSearch.C.

References e, Foam::endl(), treeBoundBox::extend(), boundBox::max(), boundBox::min(), nPoints, indexedOctree< Type >::perturbTol(), points, rndGen, UList< T >::size(), WarningInFunction, and Foam::Zero.

Here is the call graph for this function:

◆ surface()

const triSurface & surface ( ) const
inline

Return reference to the surface.

Definition at line 129 of file triSurfaceSearch.H.

Referenced by edgeIntersections::removeDegenerates(), and surfaceIntersection::surfaceIntersection().

Here is the caller graph for this function:

◆ tolerance()

scalar tolerance ( ) const
inline

Return tolerance to use in searches.

Definition at line 135 of file triSurfaceSearch.H.

◆ maxTreeDepth()

label maxTreeDepth ( ) const
inline

Return max tree depth of octree.

Definition at line 141 of file triSurfaceSearch.H.

◆ calcInside()

Foam::boolList calcInside ( const pointField searchPoints) const

Calculate for each searchPoint inside/outside status.

Definition at line 261 of file triSurfaceSearch.C.

References forAll, volumeType::INSIDE, samples(), and UList< T >::size().

Here is the call graph for this function:

◆ findNearest()

void findNearest ( const pointField samples,
const scalarField nearestDistSqr,
List< pointIndexHit > &  info 
) const

Definition at line 289 of file triSurfaceSearch.C.

References forAll, indexedOctree< Type >::perturbTol(), samples(), List< T >::setSize(), and UList< T >::size().

Referenced by triSurfaceMesh::findNearest(), and triSurfaceRegionSearch::findNearest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nearest()

Foam::pointIndexHit nearest ( const point pt,
const vector span 
) const

Calculate nearest point on surface for single searchPoint. Returns.

in pointIndexHit:

  • hit() : whether nearest point found within bounding box
  • hitPoint() : coordinate of nearest point
  • index() : surface triangle label

Definition at line 319 of file triSurfaceSearch.C.

References Foam::magSqr().

Here is the call graph for this function:

◆ findLine()

void findLine ( const pointField start,
const pointField end,
List< pointIndexHit > &  info 
) const

Definition at line 332 of file triSurfaceSearch.C.

References forAll, indexedOctree< Type >::perturbTol(), List< T >::setSize(), and UList< T >::size().

Referenced by triSurfaceMesh::findLine(), and powerLawLopesdaCostaZone::powerLawLopesdaCostaZone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findLineAny()

void findLineAny ( const pointField start,
const pointField end,
List< pointIndexHit > &  info 
) const

Definition at line 355 of file triSurfaceSearch.C.

References indexedOctree< Type >::findLineAny(), forAll, indexedOctree< Type >::perturbTol(), List< T >::setSize(), and UList< T >::size().

Referenced by triSurfaceMesh::findLineAny().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findLineAll()

void findLineAll ( const pointField start,
const pointField end,
List< List< pointIndexHit > > &  info 
) const

Calculate all intersections from start to end.

Definition at line 378 of file triSurfaceSearch.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), forAll, PointIndexHit< PointType >::hit(), PointIndexHit< PointType >::index(), Foam::normalised(), indexedOctree< Type >::perturbTol(), and UList< T >::size().

Referenced by triSurfaceMesh::findLineAll().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: