Fixes and improvements to MotionPlanner, much smarter now

This commit is contained in:
Alessandro Ranellucci 2015-12-21 14:46:35 +01:00
parent f7e97f7e9b
commit 1a286fc906
12 changed files with 198 additions and 202 deletions

View file

@ -160,17 +160,14 @@ ExPolygons
ExPolygon::simplify(double tolerance) const
{
Polygons pp = this->simplify_p(tolerance);
ExPolygons expp;
union_(pp, &expp);
return expp;
return union_ex(pp);
}
void
ExPolygon::simplify(double tolerance, ExPolygons &expolygons) const
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());
expolygons->insert(expolygons->end(), ep.begin(), ep.end());
}
void