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

46 lines
1.1 KiB
C++
Raw Normal View History

2013-07-14 14:09:54 +00:00
#ifndef slic3r_Polyline_hpp_
#define slic3r_Polyline_hpp_
#include "libslic3r.h"
#include "Line.hpp"
#include "MultiPoint.hpp"
2014-11-15 22:06:15 +00:00
#include <string>
2016-03-19 14:33:58 +00:00
#include <vector>
2013-07-14 14:09:54 +00:00
namespace Slic3r {
class Polyline;
2016-03-19 14:33:58 +00:00
class ThickPolyline;
typedef std::vector<Polyline> Polylines;
2016-03-19 14:33:58 +00:00
typedef std::vector<ThickPolyline> ThickPolylines;
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;
2016-03-19 14:33:58 +00:00
virtual 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;
2013-07-14 14:09:54 +00:00
};
2016-03-19 14:33:58 +00:00
class ThickPolyline : public Polyline {
public:
std::vector<coordf_t> width;
std::vector<bool> endpoints;
ThickLines thicklines() const;
};
2013-07-14 14:09:54 +00:00
}
#endif