Holder of intersections of edges of a surface with another surface. Optionally shuffles around points on surface to resolve any 'conflicts' (edge hitting triangle edge, edge hitting point etc.). More...
Public Member Functions | |
ClassName ("edgeIntersections") | |
edgeIntersections () | |
Construct null. More... | |
edgeIntersections (const triSurface &surf1, const triSurfaceSearch &query2, const scalarField &surf1PointTol) | |
Construct from surface and tolerance. More... | |
edgeIntersections (const List< List< pointIndexHit > > &, const labelListList &) | |
Construct from components. More... | |
const labelListList & | classification () const |
For every intersection the classification status. More... | |
label | removeDegenerates (const label nIters, const triSurface &surf1, const triSurfaceSearch &query2, const scalarField &surf1PointTol, pointField &points1) |
Resolve ties. Shuffles points so all edge - face intersections. More... | |
void | merge (const edgeIntersections &, const labelList &edgeMap, const labelList &faceMap, const bool merge=true) |
Merge (or override) edge intersection for a subset. More... | |
![]() | |
label | size () const |
Return the number of elements in the UList. More... | |
List () | |
Null constructor. More... | |
List (const label) | |
Construct with given size. More... | |
List (const label, const T &) | |
Construct with given size and value for all elements. More... | |
List (const List< T > &) | |
Copy constructor. More... | |
List (const Xfer< List< T > > &) | |
Construct by transferring the parameter contents. More... | |
List (List< T > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
List (const UList< T > &, const labelUList &mapAddressing) | |
Construct as subset. More... | |
List (InputIterator first, InputIterator last) | |
Construct given start and end iterators. More... | |
List (const FixedList< T, Size > &) | |
Construct as copy of FixedList<T, Size> More... | |
List (const PtrList< T > &) | |
Construct as copy of PtrList<T> More... | |
List (const SLList< T > &) | |
Construct as copy of SLList<T> More... | |
List (const UIndirectList< T > &) | |
Construct as copy of UIndirectList<T> More... | |
List (const BiIndirectList< T > &) | |
Construct as copy of BiIndirectList<T> More... | |
List (Istream &) | |
Construct from Istream. More... | |
List (const label s) | |
List (const label s, const T &a) | |
List (const List< T > &a) | |
List (const Xfer< List< T > > &lst) | |
List (List< T > &a, bool reUse) | |
List (const UList< T > &a, const labelUList &map) | |
List (const PtrList< T > &lst) | |
List (const SLList< T > &lst) | |
List (const UIndirectList< T > &lst) | |
List (const BiIndirectList< T > &lst) | |
List () | |
List (Istream &is) | |
autoPtr< List< T > > | clone () const |
Clone. More... | |
~List () | |
Destructor. More... | |
void | resize (const label) |
Alias for setSize(const label) More... | |
void | resize (const label, const T &) |
Alias for setSize(const label, const T&) More... | |
void | setSize (const label) |
Reset size of List. More... | |
void | setSize (const label, const T &) |
Reset size of List and value for new elements. More... | |
void | clear () |
Clear the list, i.e. set size to zero. More... | |
void | append (const T &) |
Append an element at the end of the list. More... | |
void | append (const UList< T > &) |
Append a List at the end of this list. More... | |
void | append (const UIndirectList< T > &) |
Append a UIndirectList at the end of this list. More... | |
void | transfer (List< T > &) |
Transfer the contents of the argument List into this list. More... | |
void | transfer (DynamicList< T, SizeInc, SizeMult, SizeDiv > &) |
Transfer the contents of the argument List into this list. More... | |
void | transfer (SortableList< T > &) |
Transfer the contents of the argument List into this list. More... | |
void | transfer (List< T > &a) |
void | transfer (SortableList< T > &a) |
Xfer< List< T > > | xfer () |
Transfer contents to the Xfer container. More... | |
T & | newElmt (const label) |
Return subscript-checked element of UList. More... | |
void | operator= (const UList< T > &) |
Assignment from UList operator. Takes linear time. More... | |
void | operator= (const List< T > &) |
Assignment operator. Takes linear time. More... | |
void | operator= (const SLList< T > &) |
Assignment from SLList operator. Takes linear time. More... | |
void | operator= (const UIndirectList< T > &) |
Assignment from UIndirectList operator. Takes linear time. More... | |
void | operator= (const BiIndirectList< T > &) |
Assignment from BiIndirectList operator. Takes linear time. More... | |
void | operator= (const T &) |
Assignment of all entries to the given value. More... | |
Static Public Member Functions | |
static scalarField | minEdgeLength (const triSurface &surf) |
Calculate min edge length for every surface point. More... | |
![]() | |
static const List< T > & | null () |
Return a null List. More... | |
Static Public Attributes | |
static scalar | alignedCos_ = cos(degToRad(89.0)) |
Cosine between edge and face normal when considered parallel. More... | |
Private Member Functions | |
void | intersectEdges (const triSurface &surf1, const pointField &points1, const triSurfaceSearch &querySurf2, const scalarField &surf1PointTol, const labelList &edgeLabels) |
Intersect selected surface edges (edgeLabels) with surface2. More... | |
bool | inlinePerturb (const triSurface &surf1, const scalarField &surf1PointTol, const label edgeI, Random &rndGen, pointField &points1, boolList &affectedEdges) const |
Perturb endpoints of edge if they are close to the intersection. More... | |
bool | rotatePerturb (const triSurface &surf1, const scalarField &surf1PointTol, const label edgeI, Random &rndGen, pointField &points1, boolList &affectedEdges) const |
Perturb single endpoint of edge if edge is algigned with face. More... | |
bool | offsetPerturb (const triSurface &surf1, const triSurface &surf2, const label edgeI, Random &rndGen, pointField &points1, boolList &affectedEdges) const |
Perturb edge by shifting in direction trianglecentre - intersection. More... | |
Static Private Member Functions | |
static void | checkEdges (const triSurface &surf) |
Check for too small edges. More... | |
Private Attributes | |
labelListList | classification_ |
For every entry in *this gives the edge classification result. More... | |
Additional Inherited Members | |
![]() | |
typedef SubList< T > | subList |
Declare type of subList. More... | |
![]() | |
void | size (const label) |
Override size to be inconsistent with allocated storage. More... | |
Holder of intersections of edges of a surface with another surface. Optionally shuffles around points on surface to resolve any 'conflicts' (edge hitting triangle edge, edge hitting point etc.).
Definition at line 60 of file edgeIntersections.H.
Construct null.
Definition at line 446 of file edgeIntersections.C.
edgeIntersections | ( | const triSurface & | surf1, |
const triSurfaceSearch & | query2, | ||
const scalarField & | surf1PointTol | ||
) |
Construct from surface and tolerance.
Definition at line 454 of file edgeIntersections.C.
References Foam::identity(), PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), and PrimitivePatch< Face, FaceList, PointField, PointType >::points().
edgeIntersections | ( | const List< List< pointIndexHit > > & | intersections, |
const labelListList & | classification | ||
) |
Construct from components.
Definition at line 482 of file edgeIntersections.C.
|
staticprivate |
Check for too small edges.
Definition at line 53 of file edgeIntersections.C.
References Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), boundBox::minDim(), and WarningInFunction.
|
private |
Intersect selected surface edges (edgeLabels) with surface2.
Updates *this with pointHits and classification_ with status of hitPoint compared to edge end points.
Definition at line 84 of file edgeIntersections.C.
References Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceNormals(), triSurfaceSearch::findLineAll(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), PointIndexHit< Point >::index(), Foam::Info, Foam::mag(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), n, PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), Foam::Pout, List::setSize(), List::size(), and triSurfaceSearch::surface().
|
private |
Perturb endpoints of edge if they are close to the intersection.
Move point (in points1) by factor*surf1PointTol in direction of edge. Mark pointEdges of moved point in affectedEdges. Return true if anything changed.
Definition at line 216 of file edgeIntersections.C.
References Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), forAll, Foam::mag(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), n, PrimitivePatch< Face, FaceList, PointField, PointType >::pointEdges(), rndGen(), cachedRandom::scalar01(), and List::size().
|
private |
Perturb single endpoint of edge if edge is algigned with face.
See inlinePerturb. Return true if anything changed.
Definition at line 296 of file edgeIntersections.C.
References Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), forAll, Foam::mag(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), n, PrimitivePatch< Face, FaceList, PointField, PointType >::pointEdges(), Foam::Pout, and rndGen().
|
private |
Perturb edge by shifting in direction trianglecentre - intersection.
when hits close to face. Update points, mark affected edges and return true if anything changed.
Definition at line 369 of file edgeIntersections.C.
References triFace::centre(), Foam::e, triangle::EDGE, PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), forAll, PointIndexHit< Point >::hitPoint(), PointIndexHit< Point >::index(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), triFace::nearestPointClassify(), triangle::POINT, PrimitivePatch< Face, FaceList, PointField, PointType >::pointEdges(), rndGen(), and cachedRandom::scalar01().
ClassName | ( | "edgeIntersections" | ) |
|
static |
Calculate min edge length for every surface point.
Definition at line 494 of file edgeIntersections.C.
References PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), Foam::mag(), Foam::min(), and PrimitivePatch< Face, FaceList, PointField, PointType >::pointEdges().
|
inline |
For every intersection the classification status.
Definition at line 178 of file edgeIntersections.H.
References edgeIntersections::classification_.
Referenced by edgeIntersections::merge().
Foam::label removeDegenerates | ( | const label | nIters, |
const triSurface & | surf1, | ||
const triSurfaceSearch & | query2, | ||
const scalarField & | surf1PointTol, | ||
pointField & | points1 | ||
) |
Resolve ties. Shuffles points so all edge - face intersections.
will be on the face interior. Points will be the new surface points. Returns number of iterations needed. (= nIters if still has degenerate cuts)
Definition at line 522 of file edgeIntersections.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), Foam::nl, Foam::Pout, rndGen(), List::setSize(), List::size(), triSurfaceSearch::surface(), and List::transfer().
void merge | ( | const edgeIntersections & | subInfo, |
const labelList & | edgeMap, | ||
const labelList & | faceMap, | ||
const bool | merge = true |
||
) |
Merge (or override) edge intersection for a subset.
(given as edge map and face map - for face indices stored in pointIndexHit.index())
Definition at line 680 of file edgeIntersections.C.
References edgeIntersections::classification(), Foam::faceMap(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::index(), merge(), PointIndexHit< Point >::rawPoint(), List::setSize(), and List::size().
|
private |
For every entry in *this gives the edge classification result.
-1 : intersection not close to edge 0 : intersection close to e[0] 1 : intersection close to e[1] 2 : edge aligned with intersection face
Definition at line 71 of file edgeIntersections.H.
Referenced by edgeIntersections::classification().
Cosine between edge and face normal when considered parallel.
(note: should be private and make access- and set- function)
Definition at line 142 of file edgeIntersections.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.