mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 20:57:53 -06:00
The chaining and leftmost_point methods were rewritten as static methods, so they may be called on Polylines without having to convert to PolylineCollection first.
This commit is contained in:
parent
6c5c9eddba
commit
d392858ee3
2 changed files with 123 additions and 38 deletions
|
@ -8,12 +8,26 @@ namespace Slic3r {
|
|||
|
||||
class PolylineCollection
|
||||
{
|
||||
public:
|
||||
public:
|
||||
Polylines polylines;
|
||||
void chained_path(PolylineCollection* retval, bool no_reverse = false) const;
|
||||
void chained_path_from(Point start_near, PolylineCollection* retval, bool no_reverse = false) const;
|
||||
Point leftmost_point() const;
|
||||
void chained_path(PolylineCollection* retval, bool no_reverse = false) const
|
||||
{ retval->polylines = chained_path(this->polylines, no_reverse); }
|
||||
void chained_path_from(Point start_near, PolylineCollection* retval, bool no_reverse = false) const
|
||||
{ retval->polylines = chained_path_from(this->polylines, start_near, no_reverse); }
|
||||
Point leftmost_point() const
|
||||
{ return leftmost_point(polylines); }
|
||||
void append(const Polylines &polylines);
|
||||
|
||||
static Point leftmost_point(const Polylines &polylines);
|
||||
#if SLIC3R_CPPVER > 11
|
||||
static Polylines chained_path(Polylines &&src, bool no_reverse = false);
|
||||
static Polylines chained_path_from(Polylines &&src, Point start_near, bool no_reverse = false);
|
||||
static Polylines chained_path(Polylines src, bool no_reverse = false);
|
||||
static Polylines chained_path_from(Polylines src, Point start_near, bool no_reverse = false);
|
||||
#else
|
||||
static Polylines chained_path(const Polylines &src, bool no_reverse = false);
|
||||
static Polylines chained_path_from(const Polylines &src, Point start_near, bool no_reverse = false);
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue