mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 16:21:24 -06:00
Refactoring: removed _islands members in Slic3r::GCode
This commit is contained in:
parent
4925b056c2
commit
5deadc8f12
6 changed files with 44 additions and 36 deletions
|
@ -64,6 +64,24 @@ ExPolygonCollection::contains_point(const Point &point) const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ExPolygonCollection::contains_line(const Line &line) const
|
||||
{
|
||||
for (ExPolygons::const_iterator it = this->expolygons.begin(); it != this->expolygons.end(); ++it) {
|
||||
if (it->contains_line(line)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ExPolygonCollection::contains_polyline(const Polyline &polyline) const
|
||||
{
|
||||
for (ExPolygons::const_iterator it = this->expolygons.begin(); it != this->expolygons.end(); ++it) {
|
||||
if (it->contains_polyline(polyline)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
ExPolygonCollection::simplify(double tolerance)
|
||||
{
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <myinit.h>
|
||||
#include "ExPolygon.hpp"
|
||||
#include "Line.hpp"
|
||||
#include "Polyline.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
@ -23,6 +25,8 @@ class ExPolygonCollection
|
|||
void translate(double x, double y);
|
||||
void rotate(double angle, const Point ¢er);
|
||||
bool contains_point(const Point &point) const;
|
||||
bool contains_line(const Line &line) const;
|
||||
bool contains_polyline(const Polyline &polyline) const;
|
||||
void simplify(double tolerance);
|
||||
void convex_hull(Polygon* hull) const;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue