Provide a means of reading/writing STL files (ASCII and binary). More...
#include <surfMesh/STLsurfaceFormat.H>
Provide a means of reading/writing STL files (ASCII and binary).
Definition at line 60 of file STLsurfaceFormat.H.
Public Member Functions | |
STLsurfaceFormat (const fileName &) | |
Construct from file name.
| |
virtual | ~STLsurfaceFormat () |
Destructor.
| |
virtual bool | read (const fileName &) |
Read from file.
| |
virtual void | write (const fileName &name) const |
Write object.
| |
Static Public Member Functions | |
static autoPtr< MeshedSurface < Face > > | New (const fileName &name) |
Read file and return surface.
| |
static void | writeAscii (const fileName &, const MeshedSurfaceProxy< Face > &) |
Write surface mesh components by proxy (as ASCII)
| |
static void | writeBinary (const fileName &, const MeshedSurfaceProxy< Face > &) |
Write surface mesh components by proxy (as BINARY)
| |
static void | write (const fileName &, const MeshedSurfaceProxy< Face > &) |
Write surface mesh components by proxy.
| |
static void | writeAscii (const fileName &, const UnsortedMeshedSurface< Face > &) |
Write UnsortedMeshedSurface (as ASCII) sorted by zone.
| |
static void | writeBinary (const fileName &, const UnsortedMeshedSurface< Face > &) |
Write UnsortedMeshedSurface (as BINARY) unsorted by zone.
| |
static void | write (const fileName &, const UnsortedMeshedSurface< Face > &) |
Write UnsortedMeshedSurface.
|
STLsurfaceFormat | ( | const fileName & | filename ) |
Construct from file name.
Definition at line 115 of file STLsurfaceFormat.C.
virtual ~STLsurfaceFormat | ( | ) | [inline, virtual]
|
Destructor.
Definition at line 111 of file STLsurfaceFormat.H.
static autoPtr<MeshedSurface<Face> > New | ( | const fileName & | name ) | [inline, static]
|
Read file and return surface.
Reimplemented from MeshedSurface< Face >.
Definition at line 101 of file STLsurfaceFormat.H.
References Foam::name().
void writeAscii | ( | const fileName & | filename, |
const MeshedSurfaceProxy< Face > & | surf | ||
) | [static]
|
Write surface mesh components by proxy (as ASCII)
Definition at line 192 of file STLsurfaceFormat.C.
References Foam::endl(), Foam::exit(), MeshedSurfaceProxy< Face >::faceMap(), MeshedSurfaceProxy< Face >::faces(), Foam::FatalError, FatalErrorIn, forAll, IOstream::good(), surfZoneIdentifier::name(), Foam::nl, MeshedSurfaceProxy< Face >::points(), List< T >::size(), MeshedSurfaceProxy< Face >::surfZones(), and MeshedSurfaceProxy< Face >::useFaceMap().
void writeBinary | ( | const fileName & | filename, |
const MeshedSurfaceProxy< Face > & | surf | ||
) | [static]
|
Write surface mesh components by proxy (as BINARY)
Definition at line 252 of file STLsurfaceFormat.C.
References Foam::exit(), MeshedSurfaceProxy< Face >::faceMap(), MeshedSurfaceProxy< Face >::faces(), Foam::FatalError, FatalErrorIn, forAll, MeshedSurfaceProxy< Face >::points(), List< T >::size(), MeshedSurfaceProxy< Face >::surfZones(), and MeshedSurfaceProxy< Face >::useFaceMap().
void write | ( | const fileName & | filename, |
const MeshedSurfaceProxy< Face > & | surf | ||
) | [static]
|
Write surface mesh components by proxy.
as ASCII or BINARY, depending on the extension
Definition at line 444 of file STLsurfaceFormat.C.
References fileName::ext().
Referenced by STLsurfaceFormat< Face >::write().
void writeAscii | ( | const fileName & | filename, |
const UnsortedMeshedSurface< Face > & | surf | ||
) | [static]
|
Write UnsortedMeshedSurface (as ASCII) sorted by zone.
Definition at line 338 of file STLsurfaceFormat.C.
References Foam::endl(), Foam::exit(), MeshedSurface< Face >::faces(), Foam::FatalError, FatalErrorIn, forAll, IOstream::good(), PrimitivePatch< Face,::Foam::List, pointField, point >::points(), List< T >::size(), UnsortedMeshedSurface< Face >::sortedZones(), and UnsortedMeshedSurface< Face >::zoneToc().
void writeBinary | ( | const fileName & | filename, |
const UnsortedMeshedSurface< Face > & | surf | ||
) | [static]
|
Write UnsortedMeshedSurface (as BINARY) unsorted by zone.
Definition at line 390 of file STLsurfaceFormat.C.
References Foam::exit(), MeshedSurface< Face >::faces(), Foam::FatalError, FatalErrorIn, forAll, PrimitivePatch< Face,::Foam::List, pointField, point >::points(), List< T >::size(), and UnsortedMeshedSurface< Face >::zoneIds().
void write | ( | const fileName & | filename, |
const UnsortedMeshedSurface< Face > & | surf | ||
) | [static]
|
Write UnsortedMeshedSurface.
as ASCII or BINARY, depending on the extension
Definition at line 465 of file STLsurfaceFormat.C.
References fileName::ext().
bool read | ( | const fileName & | filename ) | [virtual]
|
Read from file.
Reimplemented from MeshedSurface< Face >.
Definition at line 127 of file STLsurfaceFormat.C.
References clear(), forAll, STLsurfaceFormatCore::names(), STLsurfaceFormatCore::points(), STLsurfaceFormatCore::sizes(), STLsurfaceFormatCore::sorted(), Foam::sortedOrder(), triFace(), List< T >::xfer(), and STLsurfaceFormatCore::zoneIds().
virtual void write | ( | const fileName & | name ) | const [inline, virtual]
|
Write object.
Reimplemented from MeshedSurface< Face >.
Definition at line 157 of file STLsurfaceFormat.H.
References STLsurfaceFormat< Face >::write().