| | |
| | | return; |
| | | } |
| | | |
| | | // 解析路径坐标 |
| | | pathPoints = lujingdraw.parsePlannedPath(plannedPath); |
| | | if (pathPoints == null || pathPoints.size() < 2) { |
| | | // 1. 解析路径坐标(原始路径) |
| | | List<Point2D.Double> rawPathPoints = lujingdraw.parsePlannedPath(plannedPath); |
| | | if (rawPathPoints == null || rawPathPoints.size() < 2) { |
| | | JOptionPane.showMessageDialog(null, "路径坐标解析失败,无法进行导航预览", "错误", JOptionPane.ERROR_MESSAGE); |
| | | return; |
| | | } |
| | | |
| | | // 3. 构建最终导航路径点列表 |
| | | // 直接使用解析出来的路径点 |
| | | pathPoints = rawPathPoints; |
| | | |
| | | if (pathPoints == null || pathPoints.size() < 2) { |
| | | JOptionPane.showMessageDialog(null, "无法构建有效的导航路径", "错误", JOptionPane.ERROR_MESSAGE); |
| | | return; |
| | | } |
| | | |
| | | this.currentDikuai = dikuai; |
| | | this.currentPathIndex = 0; |