Medusa  1.1
Coordinate Free Mehless Method implementation
mm::STL Class Reference

#include <STL_fwd.hpp>

Detailed Description

Support for reading stereolithography files: https://en.wikipedia.org/wiki/STL_(file_format)

Note
Reading headers from STL files is currently not supported.
std::vector<STL::Triangle> stl = STL::read("test/testdata/tetrahedron.stl");
std::stringstream ss; ss << stl;

Definition at line 26 of file STL_fwd.hpp.

Static Public Member Functions

static std::vector< Triangleread (const std::string &filename)
 Read a binary STL file. More...
 

Classes

struct  Point
 Holds one 3d Point in a STL file. More...
 
struct  Triangle
 Holds one STL triangle, which consists of three points, a normal and an attribute. More...
 

Member Function Documentation

◆ read()

std::vector< STL::Triangle > mm::STL::read ( const std::string &  filename)
static

Read a binary STL file.

Ascii files are currently not supported.

Parameters
filenamepath to the file
Returns
A vector of triangles.
Examples
test/domains/STLShape_test.cpp, and test/io/STL_test.cpp.

Definition at line 14 of file STL.cpp.


The documentation for this class was generated from the following files:
mm::STL::read
static std::vector< Triangle > read(const std::string &filename)
Read a binary STL file.
Definition: STL.cpp:14