mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
Bugfix: fix crash in some circumstances caused by Avoid crossing perimeters. #2271
This commit is contained in:
parent
24d67c42c6
commit
6573ae002a
3 changed files with 9 additions and 3 deletions
|
@ -107,10 +107,13 @@ Point::nearest_point_index(const PointPtrs &points) const
|
|||
return this->nearest_point_index(p);
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
Point::nearest_point(const Points &points, Point* point) const
|
||||
{
|
||||
*point = points.at(this->nearest_point_index(points));
|
||||
int idx = this->nearest_point_index(points);
|
||||
if (idx == -1) return false;
|
||||
*point = points.at(idx);
|
||||
return true;
|
||||
}
|
||||
|
||||
double
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue