mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Ported ExtrusionPath::Collection->chained_path
This commit is contained in:
parent
ea1d138c95
commit
bd7b0e2aed
11 changed files with 170 additions and 57 deletions
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue