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(const std::string &FileName, bool verbose=false)