Basic surfacesurface intersection description. Constructed from two surfaces it creates a description of the intersection. More...
Public Types  
enum  intersectionType { FIRST, SECOND, SELF, SELF_REGION, NONE } 
Surface intersection types for classify, doCutEdges. More...  
Public Member Functions  
ClassName ("surfaceIntersection")  
surfaceIntersection ()  
Construct null. More...  
surfaceIntersection (const triSurfaceSearch &querySurf1, const triSurfaceSearch &querySurf2, const dictionary &dict=dictionary::null)  
Construct from two surfaces. More...  
surfaceIntersection (const triSurfaceSearch &querySurf1, const dictionary &dict=dictionary::null)  
Construct from selfintersections. More...  
surfaceIntersection (const triSurface &surf1, const edgeIntersections &intersections1, const triSurface &surf2, const edgeIntersections &intersections2)  
Construct from precalculated intersection information. More...  
const pointField &  cutPoints () const 
The list of cut points. More...  
const edgeList &  cutEdges () const 
The list of created edges. More...  
const labelPairLookup &  facePairToEdgeId () const 
Lookup of pairs of faces to created edges. More...  
const labelListList &  edgeCuts (const bool isFirstSurf) const 
Access either surf1EdgeCuts (isFirstSurface = true) or. More...  
const labelListList &  surf1EdgeCuts () const 
List of cut points on edges of surface1. More...  
const labelListList &  surf2EdgeCuts () const 
List of cut points on edges of surface2. More...  
void  mergePoints (const scalar mergeDist) 
Geometric merge points (points within mergeDist) prior to. More...  
void  mergeEdges () 
Merge duplicate edges. More...  
Static Public Attributes  
static const Enum< intersectionType >  selfIntersectionNames 
The userselectable selfintersection enumeration names. More...  
Basic surfacesurface intersection description. Constructed from two surfaces it creates a description of the intersection.
The intersection information consists of the intersection line(s) with new points, new edges between points (note that these edges and points are on both surfaces) and various addressing from original surface faces/edges to intersection and vice versa.
Gets either precalculated intersection information or calculates it itself. Algorithm works by intersecting all edges of one surface with the other surface and storing a reference from both faces (one on surface1, one on surface 2) to the vertex. If the reference reoccurs we have the second hit of both faces and an edge is created between the retrieved vertex and the new one.
Note: when doing intersecting itself uses 'tolerance' as a fraction of current edge length to determine if intersection is a pointtouching one instead of an edgepiercing action.
Some constructors allow a dictionary of intersection controls:
Property  Description  Type  Default value 

tolerance  Edgelength tolerance  scalar  1e3 
allowEdgeHits  Edgeend cuts another edge  bool  true 
snap  Snap near endpoints  bool  true 
warnDegenerate  Number of warnings about degenerate edges  label  0 
intersectionMethod  Control for self intersection  (self,region,none) 
Definition at line 130 of file surfaceIntersection.H.
enum intersectionType 
Surface intersection types for classify, doCutEdges.
Enumerator  

FIRST  First surface. 
SECOND  Second surface. 
SELF  Selfintersection. 
SELF_REGION  Selfintersection, regionwise only. 
NONE  None = invalid (for input only) 
Definition at line 135 of file surfaceIntersection.H.
Construct null.
Definition at line 1055 of file surfaceIntersection.C.
surfaceIntersection  (  const triSurfaceSearch &  querySurf1, 
const triSurfaceSearch &  querySurf2,  
const dictionary &  dict = dictionary::null 

) 
Construct from two surfaces.
Does its own cutting. Has problems with degenerate cuts
Definition at line 1071 of file surfaceIntersection.C.
References Foam::expressions::patchExpr::debug, dict, Foam::endl(), surfaceIntersection::FIRST, PrimitivePatch< FaceList, PointField >::nEdges(), PrimitivePatch< FaceList, PointField >::nPoints(), Foam::Pout, surfaceIntersection::SECOND, triSurfaceSearch::surface(), and OBJstream::write().
surfaceIntersection  (  const triSurfaceSearch &  querySurf1, 
const dictionary &  dict = dictionary::null 

) 
Construct from selfintersections.
Does its own cutting, but has problems with degenerate cuts
Definition at line 1184 of file surfaceIntersection.C.
References Foam::expressions::patchExpr::debug, dict, Foam::endl(), PrimitivePatch< FaceList, PointField >::nEdges(), Foam::Pout, triSurfaceSearch::surface(), and OBJstream::write().
surfaceIntersection  (  const triSurface &  surf1, 
const edgeIntersections &  intersections1,  
const triSurface &  surf2,  
const edgeIntersections &  intersections2  
) 
Construct from precalculated intersection information.
Advantage: intersection information is guaranteed to have no degenerate cuts.
Definition at line 1296 of file surfaceIntersection.C.
References DynamicList< T, SizeMin >::append(), Foam::expressions::patchExpr::debug, PrimitivePatch< FaceList, PointField >::edgeFaces(), Foam::endl(), surfaceIntersection::FIRST, forAll, PointIndexHit< PointType >::hitPoint(), PointIndexHit< PointType >::index(), PrimitivePatch< FaceList, PointField >::nEdges(), PrimitivePatch< FaceList, PointField >::nPoints(), Foam::Pout, surfaceIntersection::SECOND, and OBJstream::write().
ClassName  (  "surfaceIntersection"  ) 
const Foam::pointField & cutPoints  (  )  const 
The list of cut points.
Definition at line 1441 of file surfaceIntersection.C.
Referenced by edgeSurface::edgeSurface(), and intersectedSurface::intersectedSurface().
const Foam::edgeList & cutEdges  (  )  const 
The list of created edges.
Definition at line 1447 of file surfaceIntersection.C.
Referenced by edgeSurface::edgeSurface(), and intersectedSurface::intersectedSurface().
const Foam::labelPairLookup & facePairToEdgeId  (  )  const 
Lookup of pairs of faces to created edges.
Definition at line 1453 of file surfaceIntersection.C.
Referenced by edgeSurface::edgeSurface().
const Foam::labelListList & edgeCuts  (  const bool  isFirstSurf  )  const 
Access either surf1EdgeCuts (isFirstSurface = true) or.
surf2EdgeCuts
Definition at line 1460 of file surfaceIntersection.C.
Referenced by edgeSurface::edgeSurface().
const Foam::labelListList & surf1EdgeCuts  (  )  const 
List of cut points on edges of surface1.
Definition at line 1475 of file surfaceIntersection.C.
const Foam::labelListList & surf2EdgeCuts  (  )  const 
List of cut points on edges of surface2.
Definition at line 1481 of file surfaceIntersection.C.
void mergePoints  (  const scalar  mergeDist  ) 
Geometric merge points (points within mergeDist) prior to.
automatically calling mergeEdges().
Definition at line 1487 of file surfaceIntersection.C.
References Foam::constant::electromagnetic::e, forAll, Foam::inplaceRenumber(), Foam::inplaceUniqueSort(), and Foam::mergePoints().
void mergeEdges  (  ) 
Merge duplicate edges.
Definition at line 1529 of file surfaceIntersection.C.
References Foam::constant::electromagnetic::e, and forAll.

static 
The userselectable selfintersection enumeration names.
Definition at line 145 of file surfaceIntersection.H.