OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

intersectedSurface Class Reference

Given triSurface and intersection creates the intersected (properly triangulated) surface. (note: intersection is the list of points and edges 'shared' by two surfaces). More...

Inheritance diagram for intersectedSurface:
Collaboration diagram for intersectedSurface:

List of all members.


Public Member Functions

 ClassName ("intersectedSurface")
 intersectedSurface ()
 Construct null.
 intersectedSurface (const triSurface &surf)
 Construct from surface.
 intersectedSurface (const triSurface &surf, const bool isFirstSurface, const surfaceIntersection &inter)
 Construct from surface and intersection. isFirstSurface is needed.
const labelListintersectionEdges () const
 Labels of edges in *this which originate from 'cuts'.
const labelListfaceMap () const
 New to old.
label nSurfacePoints () const
 Number of points from original surface.
bool isSurfacePoint (const label pointI) const
 Is point coming from original surface?

Static Public Attributes

static const label UNVISITED = 0
static const label STARTTOEND = 1
static const label ENDTOSTART = 2
static const label BOTH = STARTTOEND | ENDTOSTART

Detailed Description

Given triSurface and intersection creates the intersected (properly triangulated) surface. (note: intersection is the list of points and edges 'shared' by two surfaces).

Algorithm:

  • from the intersection get the points created on the edges of the surface
  • split the edges of the surface
  • construct a new edgeList with (in this order) the edges from the intersection ('cuts', i.e. the edges shared with the other surface) and the (split) edges from the original triangles (from 0 .. nSurfaceEdges)
  • construct face-edge addressing for above edges
  • for each face do a right-handed walk to reconstruct faces (splitFace)
  • retriangulate resulting faces (might be non-convex so use faceTriangulation which does proper bisection)

The resulting surface will have the points from the surface first in the point list (0 .. nSurfacePoints-1)

Note: problematic are the cut-edges which are completely inside a face. These will not be visited by a edge-point-edge walk. These are handled by resplitFace which first connects the 'floating' edges to triangle edges with two extra edges and then tries the splitting again. Seems to work (mostly). Will probably fail for boundary edge (edge with only face).

Note: points are compact, i.e. points().size() == localPoints().size() (though points() probably not localPoints())

Source files

Definition at line 77 of file intersectedSurface.H.


Constructor & Destructor Documentation

Construct null.

Definition at line 1133 of file intersectedSurface.C.

intersectedSurface ( const triSurface surf  ) 

Construct from surface.

Definition at line 1143 of file intersectedSurface.C.

intersectedSurface ( const triSurface surf,
const bool  isFirstSurface,
const surfaceIntersection inter 
)

Construct from surface and intersection. isFirstSurface is needed.

to determine which side of face pairs stored in the intersection to address. Should be in the same order as how the intersection was constructed.

Definition at line 1154 of file intersectedSurface.C.


Member Function Documentation

ClassName ( "intersectedSurface"   ) 

const labelList& intersectionEdges (  )  const [inline]

Labels of edges in *this which originate from 'cuts'.

Definition at line 273 of file intersectedSurface.H.

const labelList& faceMap (  )  const [inline]

New to old.

Definition at line 279 of file intersectedSurface.H.

label nSurfacePoints (  )  const [inline]

Number of points from original surface.

Definition at line 285 of file intersectedSurface.H.

bool isSurfacePoint ( const label  pointI  )  const [inline]

Is point coming from original surface?

Definition at line 291 of file intersectedSurface.H.


Member Data Documentation

const Foam::label UNVISITED = 0 [static]

Definition at line 83 of file intersectedSurface.H.

const Foam::label STARTTOEND = 1 [static]

Definition at line 84 of file intersectedSurface.H.

const Foam::label ENDTOSTART = 2 [static]

Definition at line 85 of file intersectedSurface.H.

const Foam::label BOTH = STARTTOEND | ENDTOSTART [static]

Definition at line 86 of file intersectedSurface.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd