1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::fileFormats::AC3DsurfaceFormat
28 Provide a means of reading/writing AC3D format.
30 http://www.inivis.com/ac3d/man/ac3dfileformat.html
33 On input, the faces are already organized as zones.
34 The output is always sorted by zones.
35 In the absence of zones, a single zone will be assigned.
40 \*---------------------------------------------------------------------------*/
42 #ifndef AC3DsurfaceFormat_H
43 #define AC3DsurfaceFormat_H
45 #include "MeshedSurface.H"
46 #include "MeshedSurfaceProxy.H"
47 #include "UnsortedMeshedSurface.H"
48 #include "AC3DsurfaceFormatCore.H"
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 /*---------------------------------------------------------------------------*\
58 Class AC3DsurfaceFormat Declaration
59 \*---------------------------------------------------------------------------*/
62 class AC3DsurfaceFormat
64 public MeshedSurface<Face>,
65 public AC3DsurfaceFormatCore
67 // Private Member Functions
69 //- Disallow default bitwise copy construct
70 AC3DsurfaceFormat(const AC3DsurfaceFormat<Face>&);
72 //- Disallow default bitwise assignment
73 void operator=(const AC3DsurfaceFormat<Face>&);
80 //- Construct from file name
81 AC3DsurfaceFormat(const fileName&);
86 //- Read file and return surface
87 static autoPtr<MeshedSurface<Face> > New(const fileName& name)
89 return autoPtr<MeshedSurface<Face> >
91 new AC3DsurfaceFormat<Face>(name)
98 virtual ~AC3DsurfaceFormat()
104 //- Write surface mesh components by proxy
105 static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
107 //- Write UnsortedMeshedSurface, the output is always sorted by zones.
108 static void write(const fileName&, const UnsortedMeshedSurface<Face>&);
111 virtual bool read(const fileName&);
114 virtual void write(const fileName& name) const
116 write(name, MeshedSurfaceProxy<Face>(*this));
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 } // End namespace fileFormats
124 } // End namespace Foam
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 # include "AC3DsurfaceFormat.C"
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 // ************************************************************************* //