[
https://issues.apache.org/jira/browse/LUCENE-8245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16435278#comment-16435278
]
Karl Wright edited comment on LUCENE-8245 at 4/12/18 10:12 AM:
---------------------------------------------------------------
[~ivera], I made that change but it did not fix the problem.
Here's the code in question:
{code}
Plane fixedYAbovePlane = new Plane(testPointFixedYPlane, true);
if (fixedYAbovePlane.D - planetModel.getMaximumYValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumYValue() -
fixedYAbovePlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedYAbovePlane = null;
}
this.testPointFixedYAbovePlane = fixedYAbovePlane;
Plane fixedYBelowPlane = new Plane(testPointFixedYPlane, false);
if (fixedYBelowPlane.D - planetModel.getMaximumYValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumYValue() -
fixedYBelowPlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedYBelowPlane = null;
}
this.testPointFixedYBelowPlane = fixedYBelowPlane;
Plane fixedXAbovePlane = new Plane(testPointFixedXPlane, true);
if (fixedXAbovePlane.D - planetModel.getMaximumXValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumXValue() -
fixedXAbovePlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedXAbovePlane = null;
}
this.testPointFixedXAbovePlane = fixedXAbovePlane;
Plane fixedXBelowPlane = new Plane(testPointFixedXPlane, false);
if (fixedXBelowPlane.D - planetModel.getMaximumXValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumXValue() -
fixedXBelowPlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedXBelowPlane = null;
}
this.testPointFixedXBelowPlane = fixedXBelowPlane;
Plane fixedZAbovePlane = new Plane(testPointFixedZPlane, true);
if (fixedZAbovePlane.D - planetModel.getMaximumZValue() >=
Vector.MINIMUM_RESOLUTION ||planetModel.getMinimumZValue() - fixedZAbovePlane.D
>= Vector.MINIMUM_RESOLUTION) {
fixedZAbovePlane = null;
}
this.testPointFixedZAbovePlane = fixedZAbovePlane;
Plane fixedZBelowPlane = new Plane(testPointFixedZPlane, false);
if (fixedZBelowPlane.D - planetModel.getMaximumZValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumZValue() -
fixedZBelowPlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedZBelowPlane = null;
}
this.testPointFixedZBelowPlane = fixedZBelowPlane;
{code}
The version you have is just sign-reversed (multiplied everywhere by -1 in the
second clauses). I tried it anyways, made no difference.
I think the test should be stricter and not include the
Vector.MINIMUM_RESOLUTION -- that is, all clauses should say "> 0.0". But even
when I make that change, the test still fails.
was (Author: [email protected]):
[~ivera], I made that change but it did not fix the problem.
Here's the code in question:
{code}
Plane fixedYAbovePlane = new Plane(testPointFixedYPlane, true);
if (fixedYAbovePlane.D - planetModel.getMaximumYValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumYValue() -
fixedYAbovePlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedYAbovePlane = null;
}
this.testPointFixedYAbovePlane = fixedYAbovePlane;
Plane fixedYBelowPlane = new Plane(testPointFixedYPlane, false);
if (fixedYBelowPlane.D - planetModel.getMaximumYValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumYValue() -
fixedYBelowPlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedYBelowPlane = null;
}
this.testPointFixedYBelowPlane = fixedYBelowPlane;
Plane fixedXAbovePlane = new Plane(testPointFixedXPlane, true);
if (fixedXAbovePlane.D - planetModel.getMaximumXValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumXValue() -
fixedXAbovePlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedXAbovePlane = null;
}
this.testPointFixedXAbovePlane = fixedXAbovePlane;
Plane fixedXBelowPlane = new Plane(testPointFixedXPlane, false);
if (fixedXBelowPlane.D - planetModel.getMaximumXValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumXValue() -
fixedXBelowPlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedXBelowPlane = null;
}
this.testPointFixedXBelowPlane = fixedXBelowPlane;
Plane fixedZAbovePlane = new Plane(testPointFixedZPlane, true);
if (fixedZAbovePlane.D - planetModel.getMaximumZValue() >=
Vector.MINIMUM_RESOLUTION ||planetModel.getMinimumZValue() - fixedZAbovePlane.D
>= Vector.MINIMUM_RESOLUTION) {
fixedZAbovePlane = null;
}
this.testPointFixedZAbovePlane = fixedZAbovePlane;
Plane fixedZBelowPlane = new Plane(testPointFixedZPlane, false);
if (fixedZBelowPlane.D - planetModel.getMaximumZValue() >=
Vector.MINIMUM_RESOLUTION || planetModel.getMinimumZValue() -
fixedZBelowPlane.D >= Vector.MINIMUM_RESOLUTION) {
fixedZBelowPlane = null;
}
this.testPointFixedZBelowPlane = fixedZBelowPlane;
{code}
The version you have is just sign-reversed (multiplied everywhere by -1 in the
second clauses). I tried it anyways, made no difference.
I think the test should be stricter and not include the
Vector.MINIMUM_RESOLUTION.
> GeoComplexPolygon fails when intersection of travel plane with edge is near
> polygon point
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-8245
> URL: https://issues.apache.org/jira/browse/LUCENE-8245
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/spatial3d
> Reporter: Ignacio Vera
> Assignee: Karl Wright
> Priority: Major
> Fix For: 6.7, 7.4, master (8.0)
>
> Attachments: LUCENE-8245-case2.patch, LUCENE-8245.jpg,
> LUCENE-8245.patch, LUCENE-8245_Polygon.patch, LUCENE-8245_Random.patch,
> LUCENE-8245_case3.patch
>
>
> When a travel plane crosses an edge close to an edge point , it is possible
> that the above and below planes crosses different edges. In the current
> implementation one of the crosses is missed because we only check edges that
> are crossed by the main plain and the {{within}} result is wrong.
> One possible fix is to check always the intersection of planes and edges
> regardless if they are crossed by main plane. That fixed the above issue but
> shows other issues like travel planes crossing two edges when it should be
> only one due to the fuzziness at edge intersections.
> Not sure of a fix so I add the test showing the issue.
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]