A lexer for parsing STL ASCII files. More...
Public Member Functions | |
STLAsciiParseManual (const label nTrisEstimated) | |
Construct with the estimated number of triangles in the STL. More... | |
void | execute (std::istream &is) |
Execute parser. More... | |
Public Member Functions inherited from STLAsciiParse | |
STLAsciiParse (const label nTrisEstimated) | |
Construct with the estimated number of triangles in the STL. More... | |
void | clear () |
Reset stored values. More... | |
bool | is_sorted () const noexcept |
Do all the solid groups appear in order? More... | |
DynamicList< STLpoint > & | points () noexcept |
A list of unstitched triangle points. More... | |
DynamicList< label > & | facets () noexcept |
A list of facet IDs (group IDs) corresponds to the number of triangles. More... | |
DynamicList< word > & | names () noexcept |
Solid names in the order of their appearance. More... | |
DynamicList< label > & | sizes () noexcept |
Solid sizes in the order of their appearance. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from STLAsciiParse | |
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... | |
Protected Attributes inherited from STLAsciiParse | |
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 56 of file STLAsciiParseManual.C.
|
inline |
Construct with the estimated number of triangles in the STL.
Definition at line 133 of file STLAsciiParseManual.C.
void execute | ( | std::istream & | is | ) |
Execute parser.
Definition at line 153 of file STLAsciiParseManual.C.
References STLAsciiParse::addVertexComponent(), STLAsciiParse::beginFacet(), STLAsciiParse::beginSolid(), UList< T >::empty(), STLAsciiParse::endFacet(), FatalErrorInFunction, INBUFLEN, STLAsciiParse::lineNum_, Foam::stringOps::lower(), Foam::nl, word::null, p, perrorEOF(), perrorParse(), UList< T >::size(), and word::validate().