The object of STLReaderTyti class reads the .stl surface grid.
More...
#include <STLReader.h>
The object of STLReaderTyti class reads the .stl surface grid.
If verbose mode is true, prints the content of file on the console.
Definition at line 23 of file STLReader.h.
◆ STLReaderTyti()
MF::RW::STLReaderTyti::STLReaderTyti |
( |
const std::string & |
FileName, |
|
|
bool |
verbose = false |
|
) |
| |
|
explicit |
Definition at line 13 of file STLReader.cpp.
16 std::ifstream isFile(FileName);
18 throw std::runtime_error(FileName +
" - File not found!");
20 stlGrid = tyti::stl::read<float>(FileName);
21 std::cout <<
"Grid from " << FileName <<
" has been read successfully ----> " << stlGrid.first.header << std::endl;
24 std::cout <<
"solid " << stlGrid.first.header << std::endl;
25 for (
size_t i = 0; i < stlGrid.first.normals.size(); ++i) {
26 std::cout <<
"\tfacet normal " 27 <<
" " << stlGrid.first.normals[i].data[0] <<
" " 28 <<
" " << stlGrid.first.normals[i].data[1] <<
" " 29 <<
" " << stlGrid.first.normals[i].data[2] <<
" " 32 std::cout <<
"\t\touter loop\n";
33 for (
int j : {0, 1, 2}) {
34 std::cout <<
"\t\t\tvertex" 35 <<
" " << stlGrid.first.vertices[3 * i + j].data[0] <<
" " 36 <<
" " << stlGrid.first.vertices[3 * i + j].data[1] <<
" " 37 <<
" " << stlGrid.first.vertices[3 * i + j].data[2] <<
" " 40 std::cout <<
"\t\tendloop\n" 43 std::cout <<
"endsolid " << stlGrid.first.header <<
"\n";
◆ ~STLReaderTyti()
MF::RW::STLReaderTyti::~STLReaderTyti |
( |
| ) |
|
|
default |
◆ getSTLGrid_ref()
std::pair<tyti::stl::basic_solid<float>, bool>& MF::RW::STLReaderTyti::getSTLGrid_ref |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following files:
- /home/romek/CLionProjects/Microflow_3D_v1/source/ReadersAndWriters/STLReader.h
- /home/romek/CLionProjects/Microflow_3D_v1/source/ReadersAndWriters/STLReader.cpp