A lexer for parsing STL ASCII files. More...
Public Member Functions | |
STLAsciiParseManual (const label approxNpoints) | |
From input stream and the approximate number of vertices in the STL. More... | |
void | execute (std::istream &is) |
Execute parser. More... | |
![]() | |
STLAsciiParse (const label approxNpoints) | |
From input stream and the approximate number of vertices in the STL. More... | |
void | clear () |
Reset stored values. More... | |
bool | sorted () const |
Do all the solid groups appear in order? More... | |
DynamicList< STLpoint > & | points () |
A list of unstitched triangle points. More... | |
DynamicList< label > & | facets () |
DynamicList< word > & | names () |
Solid names in the order of their appearance. More... | |
DynamicList< label > & | sizes () |
Solid sizes in the order of their appearance. More... | |
Additional Inherited Members | |
![]() | |
void | beginSolid (word solidName) |
Action when entering 'solid'. More... | |
void | beginFacet () |
Action when entering 'facet'. More... | |
void | resetVertex () |
Reset vertex component to zero. More... | |
bool | addVertexComponent (float val) |
Add next vertex component. On each third call, adds the point. More... | |
bool | addVertexComponent (const char *text) |
Add next vertex component. On each third call, adds the point. More... | |
void | endFacet () |
Action on 'endfacet'. More... | |
STLAsciiParse (const STLAsciiParse &)=delete | |
No copy construct. More... | |
void | operator= (const STLAsciiParse &)=delete |
No copy assignment. More... | |
![]() | |
bool | sorted_ |
label | groupId_ |
label | lineNum_ |
int | nFacetPoints_ |
The number of local points on the current facet. More... | |
int | nVertexCmpt_ |
Current vertex component when reading 'vertex'. More... | |
STLpoint | currVertex_ |
Scratch space for reading 'vertex'. More... | |
DynamicList< STLpoint > | points_ |
DynamicList< label > | facets_ |
DynamicList< word > | names_ |
DynamicList< label > | sizes_ |
HashTable< label > | nameLookup_ |
A lexer for parsing STL ASCII files.
Returns DynamicList(s) of points and facets (zoneIds). The facets are within a solid/endsolid grouping
Definition at line 60 of file STLAsciiParseManual.C.
|
inline |
From input stream and the approximate number of vertices in the STL.
Definition at line 131 of file STLAsciiParseManual.C.
void execute | ( | std::istream & | is | ) |
Execute parser.
Definition at line 149 of file STLAsciiParseManual.C.
References STLAsciiParse::addVertexComponent(), STLAsciiParse::beginFacet(), STLAsciiParse::beginSolid(), STLAsciiParse::endFacet(), FatalErrorInFunction, INBUFLEN, STLAsciiParse::lineNum_, Foam::stringOps::lower(), Foam::nl, p, perrorEOF(), perrorParse(), and kkLOmega::validate().