5 For reading in stl file, both ASCII and binary.
6 In stl file, the model represented as many triangles.
7 Store every triangles and assign to several groups with a constant high,
8 then send to Slicing.o to slice to defferent layers.
16 #include "Triangle.hh"
22 double xmin, xmax, ymin, ymax, zmin, zmax;
23 int readASCII(std::string& fileTarget);
24 int readBinary(std::string& fileTarget);
25 void assignTriangles();
30 std::vector<Triangle> triangles; // contain all the triangles
31 std::vector<std::vector<Triangle>>
32 levels; // each element is a group of assigned triangles by a range of
34 double getZmax() const;
35 double getZmin() const;
36 std::vector<Triangle>& getLevel(double z);
37 int read(std::string& stl_target, bool isBinary);
39 Stl(std::string& stl_target, bool isBinary);