closedTriSurfaceMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM 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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::closedTriSurfaceMesh
26 
27 Description
28  Like triSurface, a surface geometry formed of discrete facets, e.g. \
29  triangles and/or quadrilaterals, defined in a file using formats such as
30  Wavefront OBJ, or stereolithography STL. A closedTriSurfaceMesh is a
31  geometry surface which is meant to be closed but contains some
32  imperfections, e.g. small holes or multiple parts, which mean it is not
33  strictly closed.
34 
35 Usage
36  \table
37  Property | Description | Required
38  file | Name of the geometry file | yes
39  scale | Scaling factor for surface | no
40  minQuality | Threshold triangle quality | no
41  \endtable
42 
43  Note: when calculating surface normal vectors, triangles are ignored with
44  quality < minQuality.
45 
46  Example specification in snappyHexMeshDict/geometry:
47  \verbatim
48  type closedTriSurfaceMesh;
49  file "surfaceFile.obj";
50  \endverbatim
51 
52 SourceFiles
53  closedTriSurfaceMesh.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef closedTriSurfaceMesh_H
58 #define closedTriSurfaceMesh_H
59 
60 #include "triSurfaceMesh.H"
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 
67 /*---------------------------------------------------------------------------*\
68  Class closedTriSurfaceMesh Declaration
69 \*---------------------------------------------------------------------------*/
70 
71 class closedTriSurfaceMesh
72 :
73  public triSurfaceMesh
74 {
75 public:
76 
77  //- Runtime type information
78  TypeName("closedTriSurfaceMesh");
79 
80 
81  // Constructors
82 
83  //- Construct from triSurface
85 
86  //- Construct read.
87  closedTriSurfaceMesh(const IOobject& io);
88 
89  //- Construct from IO and dictionary (used by searchableSurface).
90  // Dictionary may contain a 'scale' entry (eg, 0.001: mm -> m)
92  (
93  const IOobject& io,
94  const dictionary& dict
95  );
96 
97  //- Disallow default bitwise copy construction
99 
100 
101  // Destructor
102 
103  virtual ~closedTriSurfaceMesh();
104 
105 
106  // Member Functions
107 
108  //- Whether supports volume type, forcing to true to force getVolumeType
109  // queries for this type
110  virtual bool hasVolumeType() const
111  {
112  return true;
113  }
114 
115 
116  // Member Operators
117 
118  //- Disallow default bitwise assignment
119  void operator=(const closedTriSurfaceMesh&) = delete;
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
IOobject(const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
Definition: IOobject.C:167
Like triSurface, a surface geometry formed of discrete facets, e.g. \ triangles and/or quadrilaterals...
TypeName("closedTriSurfaceMesh")
Runtime type information.
void operator=(const closedTriSurfaceMesh &)=delete
Disallow default bitwise assignment.
closedTriSurfaceMesh(const IOobject &, const triSurface &)
Construct from triSurface.
virtual bool hasVolumeType() const
Whether supports volume type, forcing to true to force getVolumeType.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
triSurface()
Construct null.
Definition: triSurface.C:534
Namespace for OpenFOAM.
dictionary dict