mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-15 01:22:37 -07:00
Ported ExtrusionPath::Collection->chained_path
This commit is contained in:
@@ -2,24 +2,36 @@
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
ExtrusionPath*
|
||||
ExtrusionPath::clone() const
|
||||
{
|
||||
return new ExtrusionPath (*this);
|
||||
}
|
||||
|
||||
void
|
||||
ExtrusionPath::reverse()
|
||||
{
|
||||
this->polyline.reverse();
|
||||
}
|
||||
|
||||
const Point*
|
||||
ExtrusionPath::first_point() const
|
||||
Point*
|
||||
ExtrusionPath::first_point()
|
||||
{
|
||||
return &(this->polyline.points.front());
|
||||
}
|
||||
|
||||
const Point*
|
||||
ExtrusionPath::last_point() const
|
||||
Point*
|
||||
ExtrusionPath::last_point()
|
||||
{
|
||||
return &(this->polyline.points.back());
|
||||
}
|
||||
|
||||
ExtrusionLoop*
|
||||
ExtrusionLoop::clone() const
|
||||
{
|
||||
return new ExtrusionLoop (*this);
|
||||
}
|
||||
|
||||
ExtrusionPath*
|
||||
ExtrusionLoop::split_at_index(int index)
|
||||
{
|
||||
@@ -47,4 +59,22 @@ ExtrusionLoop::make_counter_clockwise()
|
||||
return this->polygon.make_counter_clockwise();
|
||||
}
|
||||
|
||||
void
|
||||
ExtrusionLoop::reverse()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
Point*
|
||||
ExtrusionLoop::first_point()
|
||||
{
|
||||
return &(this->polygon.points.front());
|
||||
}
|
||||
|
||||
Point*
|
||||
ExtrusionLoop::last_point()
|
||||
{
|
||||
return &(this->polygon.points.front()); // in polygons, first == last
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user