mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00:00
Fix of Can't convert polyline with more than two points to a line (#6933)
Sometimes Clipper produces a polyline with more than 2 points when clipping a line with a polygon or a set of polygons. We hope the intermediate points are collinear with the line, so we may just ignore them.
This commit is contained in:
@@ -10,13 +10,6 @@
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
Line Polyline::line() const
|
||||
{
|
||||
if (this->points.size() > 2)
|
||||
throw Slic3r::InvalidArgument("Can't convert polyline with more than two points to a line");
|
||||
return Line(this->points.front(), this->points.back());
|
||||
}
|
||||
|
||||
const Point& Polyline::leftmost_point() const
|
||||
{
|
||||
const Point *p = &this->points.front();
|
||||
|
||||
Reference in New Issue
Block a user