Internal class used by the STLsurfaceFormat and triSurface. More...
Public Member Functions | |
STLReader (const fileName &filename) | |
Read from file, filling in the information. More... | |
STLReader (const fileName &filename, const STLFormat format) | |
Read from file, filling in the information. More... | |
~STLReader ()=default | |
Destructor. More... | |
void | clear () |
Flush all values. More... | |
label | mergePointsMap (labelList &pointMap) const |
Calculate merge points mapping, return old to new pointMap. More... | |
label | mergePointsMap (const scalar mergeTol, labelList &pointMap) const |
Calculate merge points mapping, return old to new pointMap. More... | |
bool | sorted () const |
File read was already sorted? More... | |
List< STLpoint > & | points () |
Return full access to the points. More... | |
List< label > & | zoneIds () |
Return full access to the zoneIds. More... | |
List< word > & | names () |
The list of solid names in the order of their first appearance. More... | |
List< label > & | sizes () |
The list of solid sizes in the order of their first appearance. More... | |
enum STLFormat | stlFormat () const |
The STL format used (ASCII or BINARY) More... | |
Static Public Attributes | |
static int | parserType |
ASCII parser types (0=Flex, 1=Ragel, 2=Manual) More... | |
Additional Inherited Members | |
![]() | |
enum | STLFormat { ASCII, BINARY, UNKNOWN } |
Enumeration for the format of data in the stream. More... | |
![]() | |
STLCore ()=default | |
Default construct. More... | |
![]() | |
static bool | isBinaryName (const fileName &filename, const STLFormat format) |
Detect 'stlb' extension as binary when format = UNKNOWN. More... | |
static int | detectBinaryHeader (const fileName &filename) |
Check contents to detect if the file is a binary STL. More... | |
static std::unique_ptr< std::istream > | readBinaryHeader (const fileName &filename, label &nTrisEstimated) |
Read STL binary file header. More... | |
static void | writeBinaryHeader (ostream &os, uint32_t nTris) |
Write STL binary file and number of triangles to stream. More... | |
Internal class used by the STLsurfaceFormat and triSurface.
Definition at line 67 of file STLReader.H.
Read from file, filling in the information.
Auto-detect ASCII/BINARY format.
Definition at line 208 of file STLReader.C.
Read from file, filling in the information.
Manually selected choice of ASCII/BINARY/UNKNOWN(detect) formats.
Definition at line 225 of file STLReader.C.
References format().
|
default |
Destructor.
void clear | ( | ) |
Flush all values.
Definition at line 244 of file STLReader.C.
Foam::label mergePointsMap | ( | labelList & | pointMap | ) | const |
Calculate merge points mapping, return old to new pointMap.
The merge tolerance based on ASCII or BINARY input format.
Definition at line 256 of file STLReader.C.
References Foam::doubleScalarSMALL.
Referenced by STLsurfaceFormat< Face >::read().
Foam::label mergePointsMap | ( | const scalar | mergeTol, |
labelList & | pointMap | ||
) | const |
Calculate merge points mapping, return old to new pointMap.
Definition at line 274 of file STLReader.C.
References Foam::mergePoints().
|
inline |
File read was already sorted?
Definition at line 160 of file STLReader.H.
Referenced by STLsurfaceFormat< Face >::read().
Return full access to the points.
Definition at line 166 of file STLReader.H.
Referenced by STLsurfaceFormat< Face >::read().
|
inline |
Return full access to the zoneIds.
Definition at line 172 of file STLReader.H.
Referenced by STLsurfaceFormat< Face >::read().
The list of solid names in the order of their first appearance.
Definition at line 178 of file STLReader.H.
Referenced by STLsurfaceFormat< Face >::read().
|
inline |
The list of solid sizes in the order of their first appearance.
Definition at line 184 of file STLReader.H.
Referenced by STLsurfaceFormat< Face >::read().
|
inline |
The STL format used (ASCII or BINARY)
Definition at line 190 of file STLReader.H.
|
static |
ASCII parser types (0=Flex, 1=Ragel, 2=Manual)
Definition at line 127 of file STLReader.H.