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