Skip to content

Commit 9b320ce

Browse files
CopilotLicini
andcommitted
Enhance comment with behavioral change context for future maintainers
Co-authored-by: Licini <17893605+Licini@users.noreply.github.com>
1 parent 0b90f45 commit 9b320ce

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/compas/geometry/test_triangulation_earclip.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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],

0 commit comments

Comments
 (0)