2013-07-06 16:33:49 +02:00
|
|
|
#ifndef slic3r_ExPolygon_hpp_
|
|
|
|
|
#define slic3r_ExPolygon_hpp_
|
|
|
|
|
|
2013-07-14 15:53:53 +02:00
|
|
|
#include "Polygon.hpp"
|
2013-07-15 20:31:43 +02:00
|
|
|
#include <vector>
|
2013-07-06 16:33:49 +02:00
|
|
|
|
2013-07-07 22:36:14 +02:00
|
|
|
namespace Slic3r {
|
|
|
|
|
|
2013-07-06 16:33:49 +02:00
|
|
|
class ExPolygon
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
Polygon contour;
|
|
|
|
|
Polygons holes;
|
2013-07-15 22:57:22 +02:00
|
|
|
void from_SV(SV* poly_sv);
|
|
|
|
|
void from_SV_check(SV* poly_sv);
|
2013-09-09 22:27:58 +02:00
|
|
|
SV* to_AV();
|
2013-07-16 20:09:53 +02:00
|
|
|
SV* to_SV_ref();
|
2013-09-03 19:26:58 +02:00
|
|
|
SV* to_SV_clone_ref() const;
|
|
|
|
|
SV* to_SV_pureperl() const;
|
2013-07-11 14:08:11 +02:00
|
|
|
void scale(double factor);
|
2013-07-11 14:13:30 +02:00
|
|
|
void translate(double x, double y);
|
2013-07-14 16:03:06 +02:00
|
|
|
void rotate(double angle, Point* center);
|
2013-08-26 22:50:26 +02:00
|
|
|
double area() const;
|
2013-08-26 23:27:51 +02:00
|
|
|
bool is_valid() const;
|
2013-07-06 16:33:49 +02:00
|
|
|
};
|
|
|
|
|
|
2013-07-14 15:53:53 +02:00
|
|
|
typedef std::vector<ExPolygon> ExPolygons;
|
2013-07-11 18:55:51 +02:00
|
|
|
|
2013-07-07 22:36:14 +02:00
|
|
|
}
|
|
|
|
|
|
2013-07-06 16:33:49 +02:00
|
|
|
#endif
|