mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 13:17:54 -06:00
Use Clipper for line clipping
This commit is contained in:
parent
1d6a18071a
commit
3025c77675
20 changed files with 202 additions and 211 deletions
|
@ -41,4 +41,15 @@ PolylineCollection::chained_path_from(const Point* start_near, bool no_reverse)
|
|||
return retval;
|
||||
}
|
||||
|
||||
Point*
|
||||
PolylineCollection::leftmost_point() const
|
||||
{
|
||||
const Point* p = NULL;
|
||||
for (Polylines::const_iterator it = this->polylines.begin(); it != this->polylines.end(); ++it) {
|
||||
if (p == NULL || it->points.front().x < p->x)
|
||||
p = &(it->points.front());
|
||||
}
|
||||
return new Point (*p);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue