Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,13 @@ vector<Point> Polygon::FindPath(Point from, Point to)
ways.push_back(GetPoint(ep_l));
t = t_l;
}
else
{
// 终点刚好在当前漏斗中间,可以提前结束漏斗算法
ways.push_back(to);
break;
}

if (t >= size - 1) // //终点在中间
{
ways.push_back(to);
Expand Down