STLFile Class Reference
Stereolithography CAD file class. More...
#include <stlfile.hpp>
Public Member Functions | |
STLFile (const std::string &filename, double vertex_matching_eps=1.0e-9, double signed_volume_eps=1.0e-15) | |
Constructor for STL data from file. More... | |
STLFile (const std::vector< Vec3D > &vertex, const std::vector< VTriangle > &triangle) | |
Constructor for $STLFile from triangle and vertex data. More... | |
~STLFile () | |
Destructor. More... | |
void | save (const std::string &filename, bool ascii=true) const |
Write to file. More... | |
bool | inside (const Vec3D &x) |
Return if point x is inside solid. More... | |
void | get_bbox (Vec3D &min, Vec3D &max) const |
Return bounding box in vectors min and max. More... | |
void | debug_print (std::ostream &os) const |
Print debugging information to os. More... | |
Detailed Description
Stereolithography CAD file class.
Constructor & Destructor Documentation
◆ STLFile() [1/2]
STLFile::STLFile | ( | const std::string & | filename, |
double | vertex_matching_eps = 1.0e-9 , |
||
double | signed_volume_eps = 1.0e-15 |
||
) |
Constructor for STL data from file.
Reads either binary or ascii STL-file from filename. Triangle vertices are connected if closer that vertex_matching_eps together (absolute distance in meters). During inside() evaluation a tetrahedron volume less than signed_volume_eps is judged to be in the limits of numerical accuracy.
◆ STLFile() [2/2]
Constructor for $STLFile from triangle and vertex data.
◆ ~STLFile()
STLFile::~STLFile | ( | ) |
Destructor.
Member Function Documentation
◆ debug_print()
void STLFile::debug_print | ( | std::ostream & | os | ) | const |
Print debugging information to os.
◆ get_bbox()
Return bounding box in vectors min and max.
◆ inside()
|
inline |
Return if point x is inside solid.
◆ save()
void STLFile::save | ( | const std::string & | filename, |
bool | ascii = true |
||
) | const |
Write to file.
The documentation for this class was generated from the following files:
- stlfile.hpp
- stlfile.cpp