2013-07-14 16:09:54 +02:00
|
|
|
#ifndef slic3r_Polyline_hpp_
|
|
|
|
#define slic3r_Polyline_hpp_
|
|
|
|
|
2013-07-15 22:57:22 +02:00
|
|
|
#include "Line.hpp"
|
|
|
|
#include "MultiPoint.hpp"
|
2014-11-15 23:06:15 +01:00
|
|
|
#include <string>
|
2013-07-14 16:09:54 +02:00
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
2015-01-06 20:52:36 +01:00
|
|
|
class ExPolygon;
|
2013-11-21 17:53:50 +01:00
|
|
|
class Polyline;
|
|
|
|
typedef std::vector<Polyline> Polylines;
|
|
|
|
|
2013-07-15 22:57:22 +02:00
|
|
|
class Polyline : public MultiPoint {
|
2013-07-14 16:09:54 +02:00
|
|
|
public:
|
2013-11-21 17:53:50 +01:00
|
|
|
operator Polylines() const;
|
2014-11-15 22:41:22 +01:00
|
|
|
operator Line() const;
|
2014-04-24 16:40:10 +02:00
|
|
|
Point last_point() const;
|
|
|
|
Point leftmost_point() const;
|
2013-09-13 15:19:15 +02:00
|
|
|
Lines lines() const;
|
2013-10-27 22:57:25 +01:00
|
|
|
void clip_end(double distance);
|
2013-11-06 19:30:45 +01:00
|
|
|
void clip_start(double distance);
|
2014-03-15 16:53:20 +01:00
|
|
|
void extend_end(double distance);
|
|
|
|
void extend_start(double distance);
|
2015-01-19 18:53:04 +01:00
|
|
|
Points equally_spaced_points(double distance) const;
|
2013-11-22 02:16:10 +01:00
|
|
|
void simplify(double tolerance);
|
2015-01-06 20:52:36 +01:00
|
|
|
template <class T> void simplify_by_visibility(const T &area);
|
2014-05-22 12:28:12 +02:00
|
|
|
void split_at(const Point &point, Polyline* p1, Polyline* p2) const;
|
2014-11-15 23:06:15 +01:00
|
|
|
bool is_straight() const;
|
|
|
|
std::string wkt() const;
|
2013-09-13 14:48:40 +02:00
|
|
|
|
|
|
|
#ifdef SLIC3RXS
|
2014-01-12 00:54:10 +01:00
|
|
|
void from_SV_check(SV* poly_sv);
|
2013-09-13 14:48:40 +02:00
|
|
|
#endif
|
2013-07-14 16:09:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|