2013-07-06 15:26:32 +02:00
|
|
|
#ifndef slic3r_TriangleMesh_hpp_
|
|
|
|
#define slic3r_TriangleMesh_hpp_
|
|
|
|
|
2013-07-16 21:04:14 +02:00
|
|
|
#include <myinit.h>
|
2013-06-24 19:35:49 +02:00
|
|
|
#include <admesh/stl.h>
|
2013-09-07 14:06:09 +02:00
|
|
|
#include <vector>
|
2013-08-05 19:52:37 +02:00
|
|
|
#include "Point.hpp"
|
2013-09-07 14:06:09 +02:00
|
|
|
#include "Polygon.hpp"
|
2013-06-24 19:35:49 +02:00
|
|
|
|
2013-07-07 22:36:14 +02:00
|
|
|
namespace Slic3r {
|
|
|
|
|
2013-06-24 19:35:49 +02:00
|
|
|
class TriangleMesh
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TriangleMesh();
|
|
|
|
~TriangleMesh();
|
|
|
|
void ReadSTLFile(char* input_file);
|
2013-07-03 11:38:01 +02:00
|
|
|
void ReadFromPerl(SV* vertices, SV* facets);
|
2013-06-24 19:35:49 +02:00
|
|
|
void Repair();
|
|
|
|
void WriteOBJFile(char* output_file);
|
2013-08-04 21:34:26 +02:00
|
|
|
void scale(float factor);
|
2013-08-05 10:48:38 +02:00
|
|
|
void translate(float x, float y, float z);
|
2013-08-05 19:22:33 +02:00
|
|
|
void align_to_origin();
|
2013-08-05 19:52:37 +02:00
|
|
|
void rotate(double angle, Point* center);
|
2013-09-07 14:06:09 +02:00
|
|
|
std::vector<Polygons>* slice(const std::vector<double> &z);
|
2013-06-24 19:35:49 +02:00
|
|
|
stl_file stl;
|
|
|
|
};
|
|
|
|
|
2013-07-07 22:36:14 +02:00
|
|
|
}
|
|
|
|
|
2013-07-06 15:26:32 +02:00
|
|
|
#endif
|