1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::fileFormats::OFFsurfaceFormat
28 Provide a means of reading/writing Geomview OFF polyList format.
32 The <a href="http://www.geoview.org">Geoview</a>
33 file format information:
34 http://www.geomview.org/docs/html/OFF.html#OFF
37 When reading, the optional \a colorspec is ignored.
38 When writing, it is set to the zone number (integer).
43 \*---------------------------------------------------------------------------*/
45 #ifndef OFFsurfaceFormat_H
46 #define OFFsurfaceFormat_H
48 #include "MeshedSurface.H"
49 #include "MeshedSurfaceProxy.H"
50 #include "UnsortedMeshedSurface.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 /*---------------------------------------------------------------------------*\
60 Class OFFsurfaceFormat Declaration
61 \*---------------------------------------------------------------------------*/
64 class OFFsurfaceFormat
66 public MeshedSurface<Face>
68 // Private Member Functions
70 //- Disallow default bitwise copy construct
71 OFFsurfaceFormat(const OFFsurfaceFormat&);
73 //- Disallow default bitwise assignment
74 void operator=(const OFFsurfaceFormat&);
81 //- Construct from file name
82 OFFsurfaceFormat(const fileName&);
87 //- Read file and return surface
88 static autoPtr<MeshedSurface<Face> > New(const fileName& name)
90 return autoPtr<MeshedSurface<Face> >
92 new OFFsurfaceFormat(name)
98 virtual ~OFFsurfaceFormat()
104 //- Write surface mesh components by proxy
105 static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
108 virtual bool read(const fileName&);
111 virtual void write(const fileName& name) const
113 write(name, MeshedSurfaceProxy<Face>(*this));
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 } // End namespace fileFormats
121 } // End namespace Foam
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 # include "OFFsurfaceFormat.C"
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 // ************************************************************************* //