PrusaSlicer-NonPlainar/xs/src/libslic3r/Polyline.hpp

40 lines
948 B
C++
Raw Normal View History

2013-07-14 14:09:54 +00:00
#ifndef slic3r_Polyline_hpp_
#define slic3r_Polyline_hpp_
#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 {
class ExPolygon;
class Polyline;
typedef std::vector<Polyline> Polylines;
class Polyline : public MultiPoint {
2013-07-14 14:09:54 +00:00
public:
operator Polylines() const;
2014-11-15 21:41:22 +00:00
operator Line() const;
Point last_point() const;
Point leftmost_point() const;
2013-09-13 13:19:15 +00:00
Lines lines() const;
void clip_end(double distance);
void clip_start(double distance);
void extend_end(double distance);
void extend_start(double distance);
Points equally_spaced_points(double distance) const;
2013-11-22 01:16:10 +00:00
void simplify(double tolerance);
template <class T> void simplify_by_visibility(const T &area);
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;
#ifdef SLIC3RXS
void from_SV_check(SV* poly_sv);
#endif
2013-07-14 14:09:54 +00:00
};
}
#endif