Class for reading STL files.
More...
#include <EBGeometry_Parser.hpp>
|
using | Vec3 = EBGeometry::Vec3T< T > |
| Alias for vector type.
|
|
using | Vertex = EBGeometry::DCEL::VertexT< T, Meta > |
| Alias for vertex type.
|
|
using | Edge = EBGeometry::DCEL::EdgeT< T, Meta > |
| Alias for edge type.
|
|
using | Face = EBGeometry::DCEL::FaceT< T, Meta > |
| Alias for face type.
|
|
using | Mesh = EBGeometry::DCEL::MeshT< T, Meta > |
| Alias for mesh type.
|
|
using | EdgeIterator = EBGeometry::DCEL::EdgeIteratorT< T, Meta > |
| Alias for edge iterator type.
|
|
|
static std::shared_ptr< Mesh > | readSingle (const std::string a_filename) noexcept |
| Read a single STL object from the input file. The file can be binary or ASCII. If the STL file contains multiple solids, this routine returns the first one. More...
|
|
static std::vector< std::pair< std::shared_ptr< Mesh >, std::string > > | readMulti (const std::string a_filename) noexcept |
| Read a single STL object from the input file. The file can be binary or ASCII. More...
|
|
|
static Encoding | getEncoding (const std::string a_filename) noexcept |
| Check if the input STL file is an ASCII file or a binary. More...
|
|
static std::vector< std::pair< std::shared_ptr< Mesh >, std::string > > | readASCII (const std::string a_filename) noexcept |
| ASCII reader STL files, possibly containing multiple objects. Each object becomes a DCEL mesh. More...
|
|
static std::vector< std::pair< std::shared_ptr< Mesh >, std::string > > | readBinary (const std::string a_filename) noexcept |
| Binary reader for STL files, possibly containing multiple objects. Each object becomes a DCEL mesh. More...
|
|
static void | readSTLSoupASCII (std::vector< Vec3 > &a_vertices, std::vector< std::vector< size_t >> &a_facets, std::string &a_objectName, const std::vector< std::string > &a_fileContents, const size_t a_firstLine, const size_t a_lastLine) noexcept |
| Read an STL object as a triangle soup into a raw vertices and facets. More...
|
|
template<typename T, typename Meta>
class Parser::STL< T, Meta >
Class for reading STL files.
- Note
- T is the precision used when storing the mesh.
◆ getEncoding()
template<typename T , typename Meta >
|
inlinestaticprotectednoexcept |
Check if the input STL file is an ASCII file or a binary.
- Parameters
-
- Returns
- Returns Encoding::ASCII or Encoding::Binary,
◆ readASCII()
template<typename T , typename Meta >
static std::vector<std::pair<std::shared_ptr<Mesh>, std::string> > Parser::STL< T, Meta >::readASCII |
( |
const std::string |
a_filename | ) |
|
|
inlinestaticprotectednoexcept |
ASCII reader STL files, possibly containing multiple objects. Each object becomes a DCEL mesh.
- Parameters
-
[in] | a_filename | Input filename |
◆ readBinary()
template<typename T , typename Meta >
static std::vector<std::pair<std::shared_ptr<Mesh>, std::string> > Parser::STL< T, Meta >::readBinary |
( |
const std::string |
a_filename | ) |
|
|
inlinestaticprotectednoexcept |
Binary reader for STL files, possibly containing multiple objects. Each object becomes a DCEL mesh.
- Parameters
-
[in] | a_filename | Input filename |
◆ readMulti()
template<typename T , typename Meta >
static std::vector<std::pair<std::shared_ptr<Mesh>, std::string> > Parser::STL< T, Meta >::readMulti |
( |
const std::string |
a_filename | ) |
|
|
inlinestaticnoexcept |
Read a single STL object from the input file. The file can be binary or ASCII.
- Parameters
-
[in] | a_filename | STL file name. |
◆ readSingle()
template<typename T , typename Meta >
static std::shared_ptr<Mesh> Parser::STL< T, Meta >::readSingle |
( |
const std::string |
a_filename | ) |
|
|
inlinestaticnoexcept |
Read a single STL object from the input file. The file can be binary or ASCII. If the STL file contains multiple solids, this routine returns the first one.
- Parameters
-
[in] | a_filename | STL file name. |
◆ readSTLSoupASCII()
template<typename T , typename Meta >
static void Parser::STL< T, Meta >::readSTLSoupASCII |
( |
std::vector< Vec3 > & |
a_vertices, |
|
|
std::vector< std::vector< size_t >> & |
a_facets, |
|
|
std::string & |
a_objectName, |
|
|
const std::vector< std::string > & |
a_fileContents, |
|
|
const size_t |
a_firstLine, |
|
|
const size_t |
a_lastLine |
|
) |
| |
|
inlinestaticprotectednoexcept |
Read an STL object as a triangle soup into a raw vertices and facets.
- Parameters
-
[out] | a_vertices | Vertices |
[out] | a_facets | STL facets |
[out] | a_objectName | Object name |
[out] | a_fileContents | File contents |
[out] | a_firstLine | Line number in a_filename containing the 'solid' identifier. |
[out] | a_lastLine | Line number in a_filename containing the 'endsolid' identifier. |
The documentation for this class was generated from the following file: