Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions
orientedSurface Class Reference

Given point flip all faces such that normals point in same direction. More...

Inheritance diagram for orientedSurface:
Inheritance graph
[legend]
Collaboration diagram for orientedSurface:
Collaboration graph
[legend]

Public Types

enum  sideStat { UNVISITED, FLIP, NOFLIP }
 Enumeration listing whether face needs to be flipped. More...
 
- Public Types inherited from triSurface
typedef bool BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh. More...
 
typedef bool BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh. More...
 
- Public Types inherited from PrimitivePatch< labelledTri, List, pointField, point >
enum  surfaceTopo
 Enumeration defining the surface type. Used in check routines. More...
 
enum  surfaceTopo
 Enumeration defining the surface type. Used in check routines. More...
 
typedef labelledTri FaceType
 
typedef labelledTri FaceType
 
typedef List< labelledTriFaceListType
 
typedef List< labelledTriFaceListType
 
typedef pointField PointFieldType
 
typedef pointField PointFieldType
 
- Public Types inherited from List< labelledTri >
typedef SubList< TsubList
 Declare type of subList. More...
 

Public Member Functions

 ClassName ("orientedSurface")
 
 orientedSurface ()
 Construct null. More...
 
 orientedSurface (const triSurface &, const point &samplePoint, const bool orientOutside=true)
 Construct from triSurface and sample point which is either. More...
 
 orientedSurface (const triSurface &, const bool orientOutside=true)
 Construct from triSurface. Calculates outside point as being. More...
 
- Public Member Functions inherited from triSurface
 ClassName ("triSurface")
 Runtime type information. More...
 
 triSurface ()
 Construct null. More...
 
 triSurface (const List< labelledTri > &, const geometricSurfacePatchList &, const pointField &)
 Construct from triangles, patches, points. More...
 
 triSurface (List< labelledTri > &, const geometricSurfacePatchList &, pointField &, const bool reUse)
 Construct from triangles, patches, points. Reuse storage. More...
 
 triSurface (const List< labelledTri > &, const pointField &)
 Construct from triangles, points. Set patchnames to default. More...
 
 triSurface (const triFaceList &, const pointField &)
 Construct from triangles, points. Set region to 0 and default. More...
 
 triSurface (const fileName &)
 Construct from file name (uses extension to determine type) More...
 
 triSurface (Istream &)
 Construct from Istream. More...
 
 triSurface (const Time &d)
 Construct from objectRegistry. More...
 
 triSurface (const triSurface &)
 Construct as copy. More...
 
 ~triSurface ()
 
void clearOut ()
 Clear all data. More...
 
void clearTopology ()
 Clear topology. More...
 
void clearPatchMeshAddr ()
 Clear patch addressing. More...
 
const geometricSurfacePatchListpatches () const
 
geometricSurfacePatchListpatches ()
 
const labelListListsortedEdgeFaces () const
 Return edge-face addressing sorted (for edges with more than. More...
 
const labelListedgeOwner () const
 If 2 face neighbours: label of face where ordering of edge. More...
 
virtual void movePoints (const pointField &)
 Move points. More...
 
virtual void scalePoints (const scalar &)
 Scale points. A non-positive factor is ignored. More...
 
void checkTriangles (const bool verbose=false)
 Check/remove duplicate/degenerate triangles. More...
 
void checkEdges (const bool verbose=false)
 Check triply (or more) connected edges. More...
 
void cleanup (const bool verbose=false)
 Remove non-valid triangles. More...
 
void markZone (const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const
 Fill faceZone with currentZone for every face reachable. More...
 
label markZones (const boolList &borderEdge, labelList &faceZone) const
 (size and) fills faceZone with zone of face. Zone is area More...
 
void subsetMeshMap (const boolList &include, labelList &pointMap, labelList &faceMap) const
 'Create' sub mesh, including only faces for which More...
 
triSurface subsetMesh (const boolList &include, labelList &pointMap, labelList &faceMap) const
 Return new surface. Returns pointMap, faceMap from. More...
 
void write (Ostream &) const
 Write to Ostream in simple FOAM format. More...
 
void write (const fileName &, const bool sortByRegion=false) const
 Generic write routine. Chooses writer based on extension. More...
 
void write (const Time &) const
 Write to database. More...
 
void writeDX (const scalarField &, Ostream &) const
 Write to Ostream in OpenDX format. More...
 
void writeDX (const vectorField &, Ostream &) const
 
void writeStats (Ostream &) const
 Write some statistics. More...
 
void operator= (const triSurface &)
 
 ClassName ("triSurface")
 Runtime type information. More...
 
 triSurface ()
 Construct null. More...
 
 triSurface (const List< labelledTri > &, const geometricSurfacePatchList &, const pointField &)
 Construct from triangles, patches, points. More...
 
 triSurface (List< labelledTri > &, const geometricSurfacePatchList &, pointField &, const bool reUse)
 Construct from triangles, patches, points. Reuse storage. More...
 
 triSurface (const Xfer< List< labelledTri > > &, const geometricSurfacePatchList &, const Xfer< List< point > > &)
 Construct from triangles, patches, points. More...
 
 triSurface (const List< labelledTri > &, const pointField &)
 Construct from triangles, points. Set patchnames to default. More...
 
 triSurface (const triFaceList &, const pointField &)
 Construct from triangles, points. Set region to 0 and default. More...
 
 triSurface (const fileName &)
 Construct from file name (uses extension to determine type) More...
 
 triSurface (Istream &)
 Construct from Istream. More...
 
 triSurface (const Time &d)
 Construct from objectRegistry. More...
 
 triSurface (const triSurface &)
 Construct as copy. More...
 
 ~triSurface ()
 Destructor. More...
 
void clearOut ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
const geometricSurfacePatchListpatches () const
 
geometricSurfacePatchListpatches ()
 
const labelListListsortedEdgeFaces () const
 Return edge-face addressing sorted (for edges with more than. More...
 
const labelListedgeOwner () const
 If 2 face neighbours: label of face where ordering of edge. More...
 
virtual void movePoints (const pointField &)
 Move points. More...
 
virtual void scalePoints (const scalar)
 Scale points. A non-positive factor is ignored. More...
 
void checkTriangles (const bool verbose)
 Check/remove duplicate/degenerate triangles. More...
 
void checkEdges (const bool verbose)
 Check triply (or more) connected edges. More...
 
void cleanup (const bool verbose)
 Remove non-valid triangles. More...
 
void markZone (const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const
 Fill faceZone with currentZone for every face reachable. More...
 
label markZones (const boolList &borderEdge, labelList &faceZone) const
 (size and) fills faceZone with zone of face. Zone is area More...
 
void subsetMeshMap (const boolList &include, labelList &pointMap, labelList &faceMap) const
 'Create' sub mesh, including only faces for which More...
 
triSurface subsetMesh (const boolList &include, labelList &pointMap, labelList &faceMap) const
 Return new surface. Returns pointMap, faceMap from. More...
 
void write (Ostream &) const
 Write to Ostream in simple FOAM format. More...
 
void write (const fileName &, const bool sortByRegion=false) const
 Generic write routine. Chooses writer based on extension. More...
 
void write (const Time &) const
 Write to database. More...
 
void writeDX (const scalarField &, Ostream &) const
 Write to Ostream in OpenDX format. More...
 
void writeDX (const vectorField &, Ostream &) const
 
void writeStats (Ostream &) const
 Write some statistics. More...
 
void operator= (const triSurface &)
 
- Public Member Functions inherited from PrimitivePatch< labelledTri, List, pointField, point >
 PrimitivePatch (const List< labelledTri > &faces, const Field< point > &points)
 Construct from components. More...
 
 PrimitivePatch (List< labelledTri > &faces, Field< point > &points, const bool reUse)
 Construct from components, reuse storage. More...
 
 PrimitivePatch (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Construct as copy. More...
 
 PrimitivePatch (const List< labelledTri > &faces, const Field< point > &points)
 Construct from components. More...
 
 PrimitivePatch (const Xfer< List< labelledTri > > &faces, const Xfer< List< point > > &points)
 Construct from components. More...
 
 PrimitivePatch (List< labelledTri > &faces, Field< point > &points, const bool reUse)
 Construct from components, reuse storage. More...
 
 PrimitivePatch (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Construct as copy. More...
 
virtual ~PrimitivePatch ()
 
virtual ~PrimitivePatch ()
 Destructor. More...
 
void clearOut ()
 
void clearOut ()
 
void clearGeom ()
 
void clearGeom ()
 
void clearTopology ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
void clearPatchMeshAddr ()
 
const Field< point > & points () const
 Return reference to global points. More...
 
const Field< point > & points () const
 Return reference to global points. More...
 
label nPoints () const
 Return number of points supporting patch faces. More...
 
label nPoints () const
 Return number of points supporting patch faces. More...
 
label nEdges () const
 Return number of edges in patch. More...
 
label nEdges () const
 Return number of edges in patch. More...
 
const edgeListedges () const
 Return list of edges, address into LOCAL point list. More...
 
const edgeListedges () const
 Return list of edges, address into LOCAL point list. More...
 
label nInternalEdges () const
 Number of internal edges. More...
 
label nInternalEdges () const
 Number of internal edges. More...
 
bool isInternalEdge (const label edgeI) const
 Is internal edge? More...
 
bool isInternalEdge (const label edgeI) const
 Is internal edge? More...
 
const labelListboundaryPoints () const
 Return list of boundary points,. More...
 
const labelListboundaryPoints () const
 Return list of boundary points,. More...
 
const labelListListfaceFaces () const
 Return face-face addressing. More...
 
const labelListListfaceFaces () const
 Return face-face addressing. More...
 
const labelListListedgeFaces () const
 Return edge-face addressing. More...
 
const labelListListedgeFaces () const
 Return edge-face addressing. More...
 
const labelListListfaceEdges () const
 Return face-edge addressing. More...
 
const labelListListfaceEdges () const
 Return face-edge addressing. More...
 
const labelListListpointEdges () const
 Return point-edge addressing. More...
 
const labelListListpointEdges () const
 Return point-edge addressing. More...
 
const labelListListpointFaces () const
 Return point-face addressing. More...
 
const labelListListpointFaces () const
 Return point-face addressing. More...
 
const List< labelledTri > & localFaces () const
 Return patch faces addressing into local point list. More...
 
const List< labelledTri > & localFaces () const
 Return patch faces addressing into local point list. More...
 
const labelListmeshPoints () const
 Return labelList of mesh points in patch. More...
 
const labelListmeshPoints () const
 Return labelList of mesh points in patch. They are constructed. More...
 
const Map< label > & meshPointMap () const
 Mesh point map. Given the global point index find its. More...
 
const Map< label > & meshPointMap () const
 Mesh point map. Given the global point index find its. More...
 
const Field< point > & localPoints () const
 Return pointField of points in patch. More...
 
const Field< point > & localPoints () const
 Return pointField of points in patch. More...
 
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search. More...
 
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search. More...
 
label whichPoint (const label gp) const
 Given a global point index, return the local point. More...
 
label whichPoint (const label gp) const
 Given a global point index, return the local point index. More...
 
label whichEdge (const edge &e) const
 Given an edge in local point labels, return its index. More...
 
label whichEdge (const edge &) const
 Given an edge in local point labels, return its. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 Return labels of patch edges in the global edge list using. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 Return labels of patch edges in the global edge list using. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 Return labels of patch edges in the global edge list using. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 Return labels of patch edges in the global edge list using. More...
 
const Field< point > & faceCentres () const
 Return face centres for patch. More...
 
const Field< point > & faceCentres () const
 Return face centres for patch. More...
 
const Field< point > & faceNormals () const
 Return face normals for patch. More...
 
const Field< point > & faceNormals () const
 Return face normals for patch. More...
 
const Field< point > & pointNormals () const
 Return point normals for patch. More...
 
const Field< point > & pointNormals () const
 Return point normals for patch. More...
 
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
Foam::List< Foam::objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
Foam::List< Foam::objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices. More...
 
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices. More...
 
surfaceTopo surfaceType () const
 Calculate surface type formed by patch. More...
 
surfaceTopo surfaceType () const
 Calculate surface type formed by patch. More...
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const
 Check surface formed by patch for manifoldness (see above). More...
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const
 Check surface formed by patch for manifoldness (see above). More...
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const
 Checks primitivePatch for faces sharing point but not edge. More...
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const
 Checks primitivePatch for faces sharing point but not edge. More...
 
void writeVTK (const fileName &name) const
 Write VTK patch. More...
 
void writeVTKNormals (const fileName &name) const
 Write VTK patch normals. More...
 
virtual void movePoints (const Field< point > &)
 Correct patch after moving points. More...
 
virtual void movePoints (const Field< point > &)
 Correct patch after moving points. More...
 
void operator= (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Assignment. More...
 
void operator= (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Assignment. More...
 
- Public Member Functions inherited from List< labelledTri >
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...
 
TnewElmt (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 bool orient (triSurface &, const point &, const bool orientOutside)
 Flip faces such that normals are consistent with point: More...
 
static bool orient (triSurface &s, const triSurfaceSearch &querySurf, const point &samplePoint, const bool orientOutside)
 Flip faces such that normals are consistent with point: More...
 
- Static Public Member Functions inherited from triSurface
static fileName triSurfInstance (const Time &)
 Name of triSurface directory to use. More...
 
static fileName triSurfInstance (const Time &)
 Name of triSurface directory to use. More...
 
- Static Public Member Functions inherited from PrimitivePatch< labelledTri, List, pointField, point >
static void writeVTK (const fileName &name, const FaceListType &faces, const Field< point > &points)
 Write generic VTK patch, HJ, 14/Jan/2009. More...
 
static void writeVTKNormals (const fileName &name, const FaceListType &faces, const Field< point > &points)
 Write generic VTK patch normals, HJ, 14/Jan/2009. More...
 
- Static Public Member Functions inherited from List< labelledTri >
static const List< T > & null ()
 Return a null List. More...
 

Static Private Member Functions

static bool consistentEdge (const edge &e, const triSurface::FaceType &f0, const triSurface::FaceType &f1)
 Return true if edge is used in opposite order in faces. More...
 
static labelList faceToEdge (const triSurface &, const labelList &changedFaces)
 From changed faces get the changed edges. More...
 
static labelList edgeToFace (const triSurface &, const labelList &changedEdges, labelList &flip)
 From changed edges check the orientation of the connected faces. More...
 
static void walkSurface (const triSurface &s, const label startFaceI, labelList &flipState)
 Walk from face across connected faces. Change orientation to be. More...
 
static void propagateOrientation (const triSurface &, const point &outsidePoint, const bool orientOutside, const label nearestFaceI, const point &nearestPt, labelList &flipState)
 Given nearest point and face check orientation to nearest face. More...
 
static void findZoneSide (const triSurfaceSearch &surfSearches, const labelList &faceZone, const label zoneI, const point &visiblePoint, label &zoneFaceI, bool &isOutside)
 Find a face on zoneI and count number of intersections to determine. More...
 
static bool flipSurface (triSurface &s, const labelList &flipState)
 Given flipState reverse triangles of *this. Return true if. More...
 
static bool orientConsistent (triSurface &s)
 Make surface surface has consistent orientation across connected. More...
 

Additional Inherited Members

- Protected Member Functions inherited from triSurface
pointFieldstoredPoints ()
 Non-const access to global points. More...
 
List< Face > & storedFaces ()
 Non-const access to the faces. More...
 
pointFieldstoredPoints ()
 Non-const access to global points. More...
 
List< Face > & storedFaces ()
 Non-const access to the faces. More...
 
- Protected Member Functions inherited from List< labelledTri >
void size (const label)
 Override size to be inconsistent with allocated storage. More...
 

Detailed Description

Given point flip all faces such that normals point in same direction.

Source files

Definition at line 52 of file orientedSurface.H.

Member Enumeration Documentation

◆ sideStat

enum sideStat

Enumeration listing whether face needs to be flipped.

Enumerator
UNVISITED 
FLIP 
NOFLIP 

Definition at line 61 of file orientedSurface.H.

Constructor & Destructor Documentation

◆ orientedSurface() [1/3]

Construct null.

Definition at line 405 of file orientedSurface.C.

◆ orientedSurface() [2/3]

orientedSurface ( const triSurface surf,
const point samplePoint,
const bool  orientOutside = true 
)

Construct from triSurface and sample point which is either.

outside (orientOutside = true) or inside (orientOutside = false). Uses orient.

Definition at line 413 of file orientedSurface.C.

◆ orientedSurface() [3/3]

orientedSurface ( const triSurface surf,
const bool  orientOutside = true 
)

Construct from triSurface. Calculates outside point as being.

outside the bounding box of the surface.

Definition at line 427 of file orientedSurface.C.

References boundBox::max(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), and boundBox::span().

Here is the call graph for this function:

Member Function Documentation

◆ consistentEdge()

bool consistentEdge ( const edge e,
const triSurface::FaceType f0,
const triSurface::FaceType f1 
)
staticprivate

Return true if edge is used in opposite order in faces.

Definition at line 43 of file orientedSurface.C.

References Foam::constant::electromagnetic::e, triFace::edgeDirection(), and f1.

Here is the call graph for this function:

◆ faceToEdge()

Foam::labelList faceToEdge ( const triSurface s,
const labelList changedFaces 
)
staticprivate

From changed faces get the changed edges.

Definition at line 54 of file orientedSurface.C.

References forAll, s(), List::setSize(), and List::size().

Here is the call graph for this function:

◆ edgeToFace()

Foam::labelList edgeToFace ( const triSurface s,
const labelList changedEdges,
labelList flip 
)
staticprivate

From changed edges check the orientation of the connected faces.

and flip them. Return changed faces.

Definition at line 78 of file orientedSurface.C.

References Foam::abort(), f1, Foam::FatalError, FatalErrorInFunction, forAll, s(), List::setSize(), and List::size().

Here is the call graph for this function:

◆ walkSurface()

void walkSurface ( const triSurface s,
const label  startFaceI,
labelList flipState 
)
staticprivate

Walk from face across connected faces. Change orientation to be.

consistent with startFaceI.

Definition at line 157 of file orientedSurface.C.

References s().

Referenced by orientedSurface::orientConsistent().

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

◆ propagateOrientation()

void propagateOrientation ( const triSurface s,
const point outsidePoint,
const bool  orientOutside,
const label  nearestFaceI,
const point nearestPt,
labelList flipState 
)
staticprivate

Given nearest point and face check orientation to nearest face.

and flip if necessary (only marked in flipState) and propagate.

Definition at line 188 of file orientedSurface.C.

References Foam::endl(), n, Foam::nl, Foam::Pout, and s().

Here is the call graph for this function:

◆ findZoneSide()

void findZoneSide ( const triSurfaceSearch surfSearches,
const labelList faceZone,
const label  zoneI,
const point visiblePoint,
label zoneFaceI,
bool &  isOutside 
)
staticprivate

Find a face on zoneI and count number of intersections to determine.

orientation

Definition at line 247 of file orientedSurface.C.

References Foam::constant::electromagnetic::e, triSurfaceSearch::findLineAll(), forAll, Foam::mag(), n, s(), and triSurfaceSearch::surface().

Here is the call graph for this function:

◆ flipSurface()

bool flipSurface ( triSurface s,
const labelList flipState 
)
staticprivate

Given flipState reverse triangles of *this. Return true if.

anything flipped.

Definition at line 321 of file orientedSurface.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and s().

Referenced by orientedSurface::orientConsistent().

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

◆ orientConsistent()

bool orientConsistent ( triSurface s)
staticprivate

Make surface surface has consistent orientation across connected.

triangles.

Definition at line 358 of file orientedSurface.C.

References orientedSurface::flipSurface(), orientedSurface::NOFLIP, s(), orientedSurface::UNVISITED, and orientedSurface::walkSurface().

Here is the call graph for this function:

◆ ClassName()

ClassName ( "orientedSurface"  )

◆ orient() [1/2]

bool orient ( triSurface s,
const point samplePoint,
const bool  orientOutside 
)
static

Flip faces such that normals are consistent with point:

orientOutside=true : point outside surface orientOutside=false : point inside surface Bases orientation on normal on nearest point (linear search) and walks to rest. Surface needs to be manifold.

Definition at line 446 of file orientedSurface.C.

References PointHit::distance(), forAll, PointHit::rawPoint(), and s().

Referenced by shellSurfaces::orient().

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

◆ orient() [2/2]

bool orient ( triSurface s,
const triSurfaceSearch querySurf,
const point samplePoint,
const bool  orientOutside 
)
static

Flip faces such that normals are consistent with point:

orientOutside=true : point outside surface orientOutside=false : point inside surface Uses intersection count to orient. Handles open surfaces.

Definition at line 516 of file orientedSurface.C.

References forAll, and s().

Here is the call graph for this function:

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