1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
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
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/>.
33 \*---------------------------------------------------------------------------*/
35 #ifndef triSurface2DCheck_H
36 #define triSurface2DCheck_H
38 #include "labelLongList.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
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
61 const scalar angleTol = 5.0
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
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
103 const scalar distTol = 1e-6
105 label checkCollocatedPoints
108 const word subsetName="collocatedPoints",
109 const scalar distTol = 1e-6
112 //- check if there exist any self-intersections
113 label checkSelfIntersections
117 const scalar tol=1e-6
119 label checkSelfIntersections
122 const word subsetName="selfIntersect",
123 const scalar tol=1e-6
126 //- check if there exist any overlaps
131 const scalar tol = 1e-6,
132 const scalar angleTol = 5.0
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 // ************************************************************************* //