Helper class to search on triSurface. More...

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 triSurface & | surface () 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... | |
Helper class to search on triSurface.
Definition at line 54 of file triSurfaceSearch.H.
|
explicit |
Construct from surface. Holds reference to surface!
Definition at line 129 of file triSurfaceSearch.C.
| triSurfaceSearch | ( | const triSurface & | surface, |
| const dictionary & | dict | ||
| ) |
Construct from surface and dictionary.
Definition at line 139 of file triSurfaceSearch.C.
References dict, Foam::endl(), Foam::Info, and dictionary::readIfPresent().

| 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 164 of file triSurfaceSearch.C.
References indexedOctreeBase::perturbTol().

| ~triSurfaceSearch | ( | ) |
Destructor.
Definition at line 184 of file triSurfaceSearch.C.
| void clearOut | ( | ) |
Clear storage.
Definition at line 190 of file triSurfaceSearch.C.
Referenced by triSurfaceRegionSearch::clearOut().

| const Foam::indexedOctree< Foam::treeDataTriSurface > & tree | ( | ) | const |
Demand driven construction of the octree.
Definition at line 199 of file triSurfaceSearch.C.
References PatchTools::calcBounds(), Foam::constant::electromagnetic::e, Foam::endl(), boundBox::inflate(), nPoints, indexedOctreeBase::perturbTol(), points, rndGen, UList< T >::size(), Foam::fieldTypes::surface, and WarningInFunction.

|
inline |
Return reference to the surface.
Definition at line 155 of file triSurfaceSearch.H.
Referenced by edgeIntersections::removeDegenerates(), and surfaceIntersection::surfaceIntersection().

|
inline |
Return tolerance to use in searches.
Definition at line 163 of file triSurfaceSearch.H.
|
inline |
Return max tree depth of octree.
Definition at line 171 of file triSurfaceSearch.H.
| Foam::boolList calcInside | ( | const pointField & | searchPoints | ) | const |
Calculate for each searchPoint inside/outside status.
Definition at line 253 of file triSurfaceSearch.C.
References forAll, volumeType::INSIDE, samples(), UList< T >::size(), and tree().

| void findNearest | ( | const pointField & | samples, |
| const scalarField & | nearestDistSqr, | ||
| List< pointIndexHit > & | info | ||
| ) | const |
Definition at line 281 of file triSurfaceSearch.C.
References forAll, indexedOctreeBase::perturbTol(), samples(), List< T >::setSize(), UList< T >::size(), and tree().
Referenced by triSurfaceRegionSearch::findNearest(), and triSurfaceMesh::findNearest().


| Foam::pointIndexHit nearest | ( | const point & | pt, |
| const vector & | span | ||
| ) | const |
Calculate nearest point on surface for single searchPoint. Returns.
in pointIndexHit:
Definition at line 311 of file triSurfaceSearch.C.
References Foam::magSqr(), and tree().

| void findLine | ( | const pointField & | start, |
| const pointField & | end, | ||
| List< pointIndexHit > & | info | ||
| ) | const |
Definition at line 324 of file triSurfaceSearch.C.
References stdFoam::end(), forAll, indexedOctreeBase::perturbTol(), List< T >::setSize(), UList< T >::size(), and tree().
Referenced by triSurfaceMesh::findLine(), and powerLawLopesdaCostaZone::powerLawLopesdaCostaZone().


| void findLineAny | ( | const pointField & | start, |
| const pointField & | end, | ||
| List< pointIndexHit > & | info | ||
| ) | const |
Definition at line 347 of file triSurfaceSearch.C.
References stdFoam::end(), indexedOctree< Type >::findLineAny(), forAll, indexedOctreeBase::perturbTol(), List< T >::setSize(), UList< T >::size(), and tree().
Referenced by triSurfaceMesh::findLineAny().


| void findLineAll | ( | const pointField & | start, |
| const pointField & | end, | ||
| List< List< pointIndexHit >> & | info | ||
| ) | const |
Calculate all intersections from start to end.
Definition at line 370 of file triSurfaceSearch.C.
References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), stdFoam::end(), forAll, PointIndexHit< PointType >::hit(), PointIndexHit< PointType >::index(), Foam::normalised(), indexedOctreeBase::perturbTol(), List< T >::setSize(), UList< T >::size(), List< T >::transfer(), and tree().
Referenced by triSurfaceMesh::findLineAll().

