mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
Incomplete work for porting simplify() to XS
This commit is contained in:
parent
7475762a27
commit
518798beb3
24 changed files with 121 additions and 41 deletions
|
@ -82,6 +82,32 @@ ExPolygon::contains_point(const Point* point) const
|
|||
return true;
|
||||
}
|
||||
|
||||
Polygons
|
||||
ExPolygon::simplify(double tolerance) const
|
||||
{
|
||||
Polygons p;
|
||||
this->contour.simplify(tolerance, p);
|
||||
for (Polygons::const_iterator it = this->holes.begin(); it != this->holes.end(); ++it)
|
||||
it->simplify(tolerance, p);
|
||||
simplify_polygons(p, p);
|
||||
return p;
|
||||
}
|
||||
|
||||
ExPolygons
|
||||
ExPolygon::simplify(double tolerance) const
|
||||
{
|
||||
Polygons p = this->simplify(tolerance);
|
||||
return union_(p);
|
||||
}
|
||||
|
||||
void
|
||||
ExPolygon::simplify(double tolerance, ExPolygons &expolygons) const
|
||||
{
|
||||
ExPolygons ep = this->simplify(tolerance);
|
||||
expolygons.reserve(expolygons.size() + ep.size());
|
||||
expolygons.insert(expolygons.end(), ep.begin(), ep.end());
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
SV*
|
||||
ExPolygon::to_AV() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue