mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
More unfinished work
This commit is contained in:
parent
518798beb3
commit
df8d889481
16 changed files with 74 additions and 48 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue