File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,11 +64,13 @@ def test_earclip_polygon_wrong_winding():
6464
6565 faces = earclip_polygon (polygon )
6666
67- # Expected faces updated after fixing Polygon.normal to use normal_polygon
67+ # Expected faces updated after changing Polygon.normal to use normal_polygon
6868 # instead of normal_triangle for more robust concave polygon handling.
69- # The improved normal calculation correctly detects the winding direction
70- # for this complex concave polygon, resulting in a different but equally
71- # valid triangulation orientation.
69+ # Previous behavior: Used normal_triangle with centroid and first two points,
70+ # which could give incorrect normals for concave polygons.
71+ # New behavior: Uses normal_polygon which considers all vertices, correctly
72+ # detecting the winding direction for this complex concave polygon.
73+ # Result: Different but equally valid triangulation orientation.
7274 assert faces == [
7375 [2 , 3 , 4 ],
7476 [5 , 6 , 7 ],
You can’t perform that action at this time.
0 commit comments