mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 00:31:11 -06:00
Bugfix: a bug in Polyline::split_at() caused random loss of perimeter segments. #2495
This commit is contained in:
parent
a6f3e6bfdb
commit
6776d6bc00
5 changed files with 31 additions and 4 deletions
|
@ -278,7 +278,7 @@ ExtrusionLoop::split_at(const Point &point)
|
|||
{
|
||||
if (this->paths.empty()) return;
|
||||
|
||||
// find the closest path and closest point
|
||||
// find the closest path and closest point belonging to that path
|
||||
size_t path_idx = 0;
|
||||
Point p = this->paths.front().first_point();
|
||||
double min = point.distance_to(p);
|
||||
|
|
|
@ -159,7 +159,7 @@ Polyline::split_at(const Point &point, Polyline* p1, Polyline* p2) const
|
|||
p2->points.clear();
|
||||
p2->points.push_back(point);
|
||||
for (Lines::const_iterator line = lines.begin() + line_idx; line != lines.end(); ++line) {
|
||||
if (!line->b.coincides_with(p)) p2->points.push_back(line->b);
|
||||
p2->points.push_back(line->b);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue