FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

faceTriangulation Class Reference

Triangulation of faces. Handles concave polygons as well (inefficiently) More...

#include <triSurface/faceTriangulation.H>


Detailed Description

Triangulation of faces. Handles concave polygons as well (inefficiently)

Works by trying to subdivide the face at the vertex with 'flattest' internal angle (i.e. closest to 180 deg).

Based on routine 'Diagonal' in

"Efficient Triangulation of Simple Polygons"
Godfried Toussaint, McGill University.

After construction is the list of triangles the face is decomposed into. (Or empty list if no valid triangulation could be found).

Source files

Definition at line 66 of file faceTriangulation.H.

Inheritance diagram for faceTriangulation:
Collaboration diagram for faceTriangulation:

List of all members.

Public Member Functions

 faceTriangulation ()
 Construct null.
 faceTriangulation (const pointField &points, const face &f, const bool fallBack=false)
 Construct from face and points. Decomposition based on average.
 faceTriangulation (const pointField &points, const face &f, const vector &n, const bool fallBack=false)
 Construct from face and points and user supplied (unit) normal.
 faceTriangulation (Istream &)
 Construct from Istream.

Constructor & Destructor Documentation

Construct null.

Definition at line 614 of file faceTriangulation.C.

faceTriangulation ( const pointField &   points,
const face &   f,
const bool   fallBack = false  
)

Construct from face and points. Decomposition based on average.

normal. After construction *this is size 0 or holds the triangles. If fallBack and triangulation fails does naive triangulation and never returns 0 size.

Definition at line 622 of file faceTriangulation.C.

References Foam::mag(), face::normal(), and setSize().

faceTriangulation ( const pointField &   points,
const face &   f,
const vector &   n,
const bool   fallBack = false  
)

Construct from face and points and user supplied (unit) normal.

After construction *this is size 0 or holds the triangles. If fallBack and triangulation fails does naive triangulation and never returns 0 size.

Definition at line 646 of file faceTriangulation.C.

References setSize().

faceTriangulation ( Istream &   is  )

Construct from Istream.

Definition at line 667 of file faceTriangulation.C.


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