Public Member Functions | Private Member Functions | Private Attributes
faceDecomposition Class Reference
Collaboration diagram for faceDecomposition:
Collaboration graph
[legend]

Public Member Functions

 faceDecomposition (const face &, const pointField &)
 construct components More...
 
 ~faceDecomposition ()
 Destructor. More...
 
bool isFaceConvex () const
 check if the face is convex More...
 
bool isFacePlanar () const
 check if the face is planar More...
 
bool isFacePlanar (const scalar tol) const
 
faceList decomposeFaceIntoTriangles () const
 decompose face into triangles More...
 
faceList decomposeFace () const
 

Private Member Functions

label concaveVertex () const
 
faceList decomposeFaceIntoTriangles (const label cv) const
 
void operator= (const faceDecomposition &)
 disallows bitwise construct More...
 
 faceDecomposition (const faceDecomposition &)
 copy constructor More...
 

Private Attributes

const facef_
 
const pointFieldpoints_
 

Detailed Description

Definition at line 47 of file faceDecomposition.H.

Constructor & Destructor Documentation

◆ faceDecomposition() [1/2]

faceDecomposition ( const faceDecomposition )
private

copy constructor

Referenced by faceDecomposition::decomposeFace().

Here is the caller graph for this function:

◆ faceDecomposition() [2/2]

faceDecomposition ( const face f,
const pointField pts 
)

construct components

Constructor.

Definition at line 88 of file faceDecomposition.C.

◆ ~faceDecomposition()

Destructor.

Definition at line 99 of file faceDecomposition.C.

Member Function Documentation

◆ concaveVertex()

label concaveVertex ( ) const
private

find concave vertex and return its position in the face

Definition at line 40 of file faceDecomposition.C.

References face::edges(), Foam::exit(), faceDecomposition::f_, Foam::FatalError, FatalErrorIn, forAll, Foam::mag(), n, face::normal(), faceDecomposition::points_, and List::size().

Referenced by faceDecomposition::decomposeFace(), faceDecomposition::decomposeFaceIntoTriangles(), and faceDecomposition::isFaceConvex().

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

◆ decomposeFaceIntoTriangles() [1/2]

faceList decomposeFaceIntoTriangles ( const label  cv) const
private

decomposes the face into triangle starting from the given vertex

Definition at line 235 of file faceDecomposition.C.

References Foam::add(), face::edges(), Foam::endl(), faceDecomposition::f_, forAll, Foam::Info, List::newElmt(), List::setSize(), and List::size().

Here is the call graph for this function:

◆ operator=()

void operator= ( const faceDecomposition )
private

disallows bitwise construct

◆ isFaceConvex()

bool isFaceConvex ( ) const

check if the face is convex

Definition at line 103 of file faceDecomposition.C.

References faceDecomposition::concaveVertex().

Referenced by faceDecomposition::decomposeFace().

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

◆ isFacePlanar() [1/2]

bool isFacePlanar ( ) const

check if the face is planar

Definition at line 130 of file faceDecomposition.C.

References Foam::constant::universal::c, face::centre(), faceDecomposition::f_, forAll, Foam::mag(), Foam::max(), and faceDecomposition::points_.

Here is the call graph for this function:

◆ isFacePlanar() [2/2]

bool isFacePlanar ( const scalar  tol) const

Definition at line 113 of file faceDecomposition.C.

References Foam::endl(), faceDecomposition::f_, forAll, Foam::Info, Foam::mag(), face::normal(), and faceDecomposition::points_.

Here is the call graph for this function:

◆ decomposeFaceIntoTriangles() [2/2]

faceList decomposeFaceIntoTriangles ( ) const

decompose face into triangles

Definition at line 278 of file faceDecomposition.C.

References faceDecomposition::concaveVertex().

Referenced by faceDecomposition::decomposeFace().

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

◆ decomposeFace()

faceList decomposeFace ( ) const

decompose face into the minimal number of convex faces

face is decomposed into 2 or 3 triangles. I am happy with that.

merge on the side of lower labels

merge from the side of higher labels

this happens if the face has odd number of edges

Definition at line 143 of file faceDecomposition.C.

References faceDecomposition::concaveVertex(), faceDecomposition::decomposeFaceIntoTriangles(), Foam::endl(), faceDecomposition::f_, faceDecomposition::faceDecomposition(), Foam::fv::ff(), Foam::Info, faceDecomposition::isFaceConvex(), Foam::help::mergeTwoFaces(), List::newElmt(), faceDecomposition::points_, List::setSize(), and List::size().

Here is the call graph for this function:

Field Documentation

◆ f_

const face& f_
private

◆ points_

const pointField& points_
private

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