mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Bugfix: crash when rendering lines with zero length in 3D preview. #2569
This commit is contained in:
parent
a10a554e2a
commit
c264969962
8 changed files with 35 additions and 30 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue