roblburris opened a new pull request, #15700:
URL: https://github.com/apache/lucene/pull/15700

   ### Description
   Attempted fix for https://github.com/apache/lucene/issues/15695. Apologies 
in advance if this is garbage, but I had Claude make an attempt at fixing the 
Tessellation error for the geometry in #15695:
   > When holes are eliminated left-to-right, `splitPolygon` creates copies of 
bridge endpoints in the ring. If multiple holes share the same leftmost vertex, 
the ring accumulates multiple copies of that vertex (all with the same `idx`). 
The angle-based `getSharedInsideVertex` tiebreaker could select the wrong copy 
when merging subsequent holes, producing a malformed ring that fails 
ear-clipping.
   >
   > This is fixed by taking the first match in ring order from `outerNode` for 
leftmost shared vertices instead of using the angle-based tiebreaker. When 
multiple copies exist, `outerNode` is updated to the bridge position so 
subsequent holes start scanning from the correct place. This PR also fixes a 
duplicate `tessellation.add()` call in `cureLocalIntersections` that was adding 
the same triangle twice.
   
   All tests pass including a new one for the geometry linked in #15695. The 
description of the problem and fix seem correct but will defer to people more 
familiar with the nuances of Tessellation for review. Thanks!
   
   <!--
   If this is your first contribution to Lucene, please make sure you have 
reviewed the contribution guide.
   https://github.com/apache/lucene/blob/main/CONTRIBUTING.md
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to