Class to read STL files.
More...
#include <STLReader.h>
|
| bool | read (const std::string &filename) |
| | Read the STL file.
|
| |
| const std::vector< Triangle > & | getTriangles () const |
| | Get the triangles of the STL mesh.
|
| |
| void | removeTrianglesOutsideLimits (const Vector3d &min, const Vector3d &max) |
| | Remove triangles that have all vertices outside the specified bounding box.
|
| |
| void | recalculateNormals () |
| | Recalculate the normals of the triangles.
|
| |
| bool | writeSTL (const std::string &output_filename) const |
| | Write the STL file.
|
| |
|
| bool | readASCII (std::ifstream &file) |
| | Read the ASCII STL file.
|
| |
| bool | readBinary (std::ifstream &file) |
| | Read the binary STL file.
|
| |
◆ getTriangles()
| const std::vector< Triangle > & STLReader::getTriangles |
( |
| ) |
const |
Get the triangles of the STL mesh.
- Returns
- Vector containing the triangles
◆ read()
| bool STLReader::read |
( |
const std::string & |
filename | ) |
|
◆ readASCII()
| bool STLReader::readASCII |
( |
std::ifstream & |
file | ) |
|
|
private |
◆ readBinary()
| bool STLReader::readBinary |
( |
std::ifstream & |
file | ) |
|
|
private |
Read the binary STL file.
◆ recalculateNormals()
| void STLReader::recalculateNormals |
( |
| ) |
|
Recalculate the normals of the triangles.
This function recalculates the normals of the triangles based on their vertices.
◆ removeTrianglesOutsideLimits()
| void STLReader::removeTrianglesOutsideLimits |
( |
const Vector3d & |
min, |
|
|
const Vector3d & |
max |
|
) |
| |
Remove triangles that have all vertices outside the specified bounding box.
- Parameters
-
| min | Bounding box minimum (x_min, y_min, z_min) |
| max | Bounding box maximum (x_max, y_max, z_max) |
◆ writeSTL()
| bool STLReader::writeSTL |
( |
const std::string & |
output_filename | ) |
const |
Write the STL file.
- Parameters
-
| output_filename | The name of the output STL file |
◆ triangles
| std::vector<Triangle> STLReader::triangles |
|
private |
Vector containing the triangles.
The documentation for this class was generated from the following file: