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. | |
| void | execute (std::istream &is) |
| Execute parser. | |
| Public Member Functions inherited from STLAsciiParse | |
| STLAsciiParse (const label nTrisEstimated) | |
| Construct with the estimated number of triangles in the STL. | |
| void | clear () |
| Reset stored values. | |
| bool | is_sorted () const noexcept |
| Do all the solid groups appear in order? | |
| DynamicList< STLpoint > & | points () noexcept |
| A list of unstitched triangle points. | |
| DynamicList< label > & | facets () noexcept |
| A list of facet IDs (group IDs) corresponds to the number of triangles. | |
| DynamicList< word > & | names () noexcept |
| Solid names in the order of their appearance. | |
| DynamicList< label > & | sizes () noexcept |
| Solid sizes in the order of their appearance. | |
Additional Inherited Members | |
| Protected Member Functions inherited from STLAsciiParse | |
| void | beginSolid (word solidName) |
| Action when entering 'solid'. | |
| void | beginFacet () |
| Action when entering 'facet'. | |
| void | resetVertex () |
| Reset vertex component to zero. | |
| bool | addVertexComponent (float val) |
| Add next vertex component. On each third call, adds the point. | |
| bool | addVertexComponent (const char *text) |
| Add next vertex component. On each third call, adds the point. | |
| void | endFacet () |
| Action on 'endfacet'. | |
| STLAsciiParse (const STLAsciiParse &)=delete | |
| No copy construct. | |
| void | operator= (const STLAsciiParse &)=delete |
| No copy assignment. | |
| Protected Attributes inherited from STLAsciiParse | |
| bool | sorted_ |
| label | groupId_ |
| label | lineNum_ |
| int | nFacetPoints_ |
| The number of local points on the current facet. | |
| int | nVertexCmpt_ |
| Current vertex component when reading 'vertex'. | |
| STLpoint | currVertex_ |
| Scratch space for reading 'vertex'. | |
| 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.
References STLAsciiParse::STLAsciiParse().

| void execute | ( | std::istream & | is | ) |
Execute parser.
Definition at line 153 of file STLAsciiParseManual.C.
References STLAsciiParse::addVertexComponent(), STLAsciiParse::beginFacet(), STLAsciiParse::beginSolid(), STLAsciiParse::endFacet(), FatalErrorInFunction, INBUFLEN, STLAsciiParse::lineNum_, Foam::stringOps::lower(), Foam::nl, word::null, p, perrorEOF(), perrorParse(), and word::validate().
