2013-07-14 15:53:53 +02:00
|
|
|
#ifndef slic3r_Polygon_hpp_
|
|
|
|
#define slic3r_Polygon_hpp_
|
|
|
|
|
2013-07-16 21:04:14 +02:00
|
|
|
#include <myinit.h>
|
2013-07-15 20:31:43 +02:00
|
|
|
#include <vector>
|
2013-07-16 21:04:14 +02:00
|
|
|
#include "Line.hpp"
|
|
|
|
#include "MultiPoint.hpp"
|
2013-07-14 16:09:54 +02:00
|
|
|
#include "Polyline.hpp"
|
2013-07-14 15:53:53 +02:00
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
2013-07-15 23:28:23 +02:00
|
|
|
class Polygon : public MultiPoint {
|
|
|
|
public:
|
2013-09-02 22:33:03 +02:00
|
|
|
Point* last_point() const;
|
2013-09-03 19:26:58 +02:00
|
|
|
SV* to_SV_ref();
|
2013-09-02 20:22:20 +02:00
|
|
|
SV* to_SV_clone_ref() const;
|
2013-09-03 19:26:58 +02:00
|
|
|
Lines lines() const;
|
2013-08-26 22:39:35 +02:00
|
|
|
Polyline* split_at(const Point* point);
|
2013-07-15 23:38:06 +02:00
|
|
|
Polyline* split_at_index(int index);
|
|
|
|
Polyline* split_at_first_point();
|
2013-08-26 22:50:26 +02:00
|
|
|
double area() const;
|
|
|
|
bool is_counter_clockwise() const;
|
2013-08-27 01:26:44 +02:00
|
|
|
bool is_clockwise() const;
|
2013-07-16 21:09:29 +02:00
|
|
|
bool make_counter_clockwise();
|
|
|
|
bool make_clockwise();
|
2013-08-26 23:27:51 +02:00
|
|
|
bool is_valid() const;
|
2013-07-15 23:28:23 +02:00
|
|
|
};
|
2013-07-15 16:21:09 +02:00
|
|
|
|
2013-07-15 20:31:43 +02:00
|
|
|
typedef std::vector<Polygon> Polygons;
|
2013-07-14 15:53:53 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|