Bugfix: crash when rendering lines with zero length in 3D preview. #2569

This commit is contained in:
Alessandro Ranellucci 2015-01-25 15:21:45 +01:00
parent a10a554e2a
commit c264969962
8 changed files with 35 additions and 30 deletions

View file

@ -89,6 +89,17 @@ MultiPoint::bounding_box() const
return BoundingBox(this->points);
}
void
MultiPoint::remove_duplicate_points()
{
for (size_t i = 1; i < this->points.size(); ++i) {
if (this->points.at(i).coincides_with(this->points.at(i-1))) {
this->points.erase(this->points.begin() + i);
--i;
}
}
}
Points
MultiPoint::_douglas_peucker(const Points &points, const double tolerance)
{