张世豪
昨天 913a3b7409e08fd239a65ff7afabefe95b51865a
src/lujing/YixinglujingHaveObstacel.java
@@ -65,7 +65,7 @@
     */
    private static List<Point> computeWorkingArea(List<Point> boundary, List<Obstacle> obstacles, double margin) {
        // 首先生成内缩边界
        List<Point> offsetBoundary = offsetPolygon(boundary, -margin);
        List<Point> offsetBoundary = offsetPolygon(boundary, margin);
        
        if (obstacles.isEmpty()) {
            return offsetBoundary;
@@ -127,7 +127,7 @@
        
        for (int pass = 0; pass < borderPasses; pass++) {
            double offset = pass * width;
            List<Point> offsetPoly = offsetPolygon(polygon, -offset);
            List<Point> offsetPoly = offsetPolygon(polygon, offset);
            
            if (offsetPoly.size() < 3) break;
            
@@ -803,7 +803,7 @@
            } else if (points.size() >= 3) {
                // 多边形障碍物
                makeCCW(points);
                List<Point> expanded = offsetPolygon(points, margin);
                List<Point> expanded = offsetPolygon(points, -margin);
                obstacles.add(new PolygonalObstacle(expanded));
            }
        }