Make sure exclusion area is correctly rendered even in wrong orientation

This commit is contained in:
Noisyfox 2025-04-26 12:38:13 +08:00
parent 6938d2da7f
commit 2cc5b3e335

View file

@ -2624,6 +2624,8 @@ void PartPlate::generate_exclude_polygon(ExPolygon &exclude_polygon)
exclude_polygon.contour.append({ scale_(p(0)), scale_(p(1)) }); exclude_polygon.contour.append({ scale_(p(0)), scale_(p(1)) });
} }
} }
exclude_polygon.contour.make_counter_clockwise();
} }
bool PartPlate::set_shape(const Pointfs& shape, const Pointfs& exclude_areas, Vec2d position, float height_to_lid, float height_to_rod) bool PartPlate::set_shape(const Pointfs& shape, const Pointfs& exclude_areas, Vec2d position, float height_to_lid, float height_to_rod)