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

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...

#include <meshTools/intersectedSurface.H>


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 82 of file intersectedSurface.H.

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 labelList &  intersectionEdges () const
 Labels of edges in *this which originate from 'cuts'.
const labelList &  faceMap () 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

Constructor & Destructor Documentation

Construct null.

Definition at line 1141 of file intersectedSurface.C.

intersectedSurface ( const triSurface &   surf  )

Construct from surface.

Definition at line 1151 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 268 of file intersectedSurface.H.

Referenced by booleanSurface::booleanSurface().

const labelList& faceMap (  ) const [inline]

New to old.

Definition at line 274 of file intersectedSurface.H.

Referenced by booleanSurface::booleanSurface().

label nSurfacePoints (  ) const [inline]

Number of points from original surface.

Definition at line 280 of file intersectedSurface.H.

Referenced by booleanSurface::booleanSurface().

bool isSurfacePoint ( const label   pointI  ) const [inline]

Is point coming from original surface?

Definition at line 286 of file intersectedSurface.H.

Referenced by booleanSurface::booleanSurface().


Member Data Documentation

const Foam::label UNVISITED = 0 [static]

Definition at line 88 of file intersectedSurface.H.

const Foam::label STARTTOEND = 1 [static]

Definition at line 89 of file intersectedSurface.H.

const Foam::label ENDTOSTART = 2 [static]

Definition at line 90 of file intersectedSurface.H.

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

Definition at line 91 of file intersectedSurface.H.


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