mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
More unfinished work
This commit is contained in:
@@ -128,7 +128,21 @@ Polygon::contains_point(const Point* point) const
|
||||
Polygons
|
||||
Polygon::simplify(double tolerance) const
|
||||
{
|
||||
Polygon p = *this;
|
||||
p.points = MultiPoint::_douglas_peucker(p.points, tolerance);
|
||||
|
||||
Polygons pp;
|
||||
pp.push_back(p);
|
||||
simplify_polygons(pp, pp);
|
||||
return pp;
|
||||
}
|
||||
|
||||
void
|
||||
Polygon::simplify(double tolerance, Polygons &polygons) const
|
||||
{
|
||||
Polygons pp = this->simplify(tolerance);
|
||||
polygons.reserve(polygons.size() + pp.size());
|
||||
polygons.insert(polygons.end(), pp.begin(), pp.end());
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
|
||||
Reference in New Issue
Block a user