Forward compatibility: flex
[foam-extend-3.2.git] / src / mesh / cfMesh / utilities / triSurfaceTools / triSurfaceChecks / triSurfaceChecks.H
blobdd02e25602d98b7b7d2dc953062349811165127d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | cfMesh: A library for mesh generation
4    \\    /   O peration     |
5     \\  /    A nd           | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6      \\/     M anipulation  | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9     This file is part of cfMesh.
11     cfMesh is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 3 of the License, or (at your
14     option) any later version.
16     cfMesh is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with cfMesh.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     triSurface2DCheck
27 Description
30 SourceFiles
31     triSurface2DCheck.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef triSurface2DCheck_H
36 #define triSurface2DCheck_H
38 #include "labelLongList.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
45 class triSurf;
46 class boundBox;
48 /*---------------------------------------------------------------------------*\
49                     Namespace triSurfaceChecka Declaration
50 \*---------------------------------------------------------------------------*/
52 namespace triSurfaceChecks
55 //- check the angles of triangles. Triangles wth the smallest angle below
56 //- the given threshold are marked as bad-quality triangles
57 label checkAngles
59     const triSurf&,
60     labelLongList&,
61     const scalar angleTol = 5.0
64 label checkAngles
66     triSurf&,
67     const word subsetName = "smallAngles",
68     const scalar angleTol = 5.0
71 //- check for existence of boudary and non-manifold edges
72 label checkSurfaceManifolds(const triSurf&, labelLongList&triangleInManifold);
73 label checkSurfaceManifolds(triSurf&, const word subsetPrefix="manifold_");
75 //- check for existence of holes in the surface mesh
76 label checkForHoles(const triSurf&, labelLongList&);
77 label checkForHoles(triSurf&, const word subsetName="holes");
79 //- check for existence of non-manifold edges
80 label checkForNonManifoldEdges(const triSurf&, labelLongList&);
81 label checkForNonManifoldEdges
83     triSurf&,
84     const word subsetPrefix="nonManifold_"
87 //- check orientation of triangles
88 label checkOrientation(const triSurf&, labelLongList& triangleInGroup);
89 label checkOrientation(triSurf&, const word subsetPrefix="orientation_");
91 //- check for disconnected surface parts
92 label checkDisconnectedParts(const triSurf&, labelLongList& triangleInRegion);
93 label checkDisconnectedParts(triSurf&, const word subsetPrefix="region_");
95 //- calculate bounding box of the surface mesh
96 void calculateBoundingBox(const triSurf&, boundBox&);
98 //- check existence of collocated points
99 label checkCollocatedPoints
101     const triSurf&,
102     labelLongList&,
103     const scalar distTol = 1e-6
105 label checkCollocatedPoints
107     triSurf&,
108     const word subsetName="collocatedPoints",
109     const scalar distTol = 1e-6
112 //- check if there exist any self-intersections
113 label checkSelfIntersections
115     const triSurf&,
116     labelLongList&,
117     const scalar tol=1e-6
119 label checkSelfIntersections
121     triSurf&,
122     const word subsetName="selfIntersect",
123     const scalar tol=1e-6
126 //- check if there exist any overlaps
127 label checkOverlaps
129     const triSurf&,
130     labelLongList&,
131     const scalar tol = 1e-6,
132     const scalar angleTol = 5.0
134 label checkOverlaps
136     triSurf&,
137     const word subsetName="overlappingTriangles",
138     const scalar tol = 1e-6,
139     const scalar angleTol = 5.0
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 } // End namespace triSurfaceChecks
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #endif
154 // ************************************************************************* //