Skip to content

Commit

Permalink
revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
iverase committed Apr 20, 2022
1 parent 0870f49 commit 0d961ea
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions lucene/core/src/java/org/apache/lucene/geo/Tessellator.java
Original file line number Diff line number Diff line change
Expand Up @@ -429,25 +429,20 @@ && pointInEar(
p.getX(), p.getY(), hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy)) {
tan = Math.abs(hy - p.getY()) / (hx - p.getX()); // tangential
if (isVertexEquals(p, connection) && isLocallyInside(p, holeNode)) {
// make sure we are building a CW polygon. This might happen when one or more holes have
// make sure we are building a non-crossing CW polygon. This might happen when one or more holes have
// a bridge to a polygon vertex which contains more than one possibility (is a point
// with a touching hole).
if (area(
p.previous.getX(),
p.previous.getY(),
p.getX(),
p.getY(),
holeNode.getX(),
holeNode.getY())
<= 0
&& area(
holeNode.previous.getX(),
holeNode.previous.getY(),
holeNode.getX(),
holeNode.getY(),
p.getX(),
p.getY())
<= 0) {
boolean crosses =
GeoUtils.lineCrossesLine(
p.getX(),
p.getY(),
holeNode.getX(),
holeNode.getY(),
connection.next.getX(),
connection.next.getY(),
connection.previous.getX(),
connection.previous.getY());
if (crosses == false) {
connection = p;
tanMin = tan;
}
Expand Down

0 comments on commit 0d961ea

Please sign in to comment.