gün alppay created MATH-1168:
--------------------------------
Summary: PolygonSet instantiation throws NullPointerException
Key: MATH-1168
URL: https://issues.apache.org/jira/browse/MATH-1168
Project: Commons Math
Issue Type: Bug
Affects Versions: 3.3
Environment: windows 8
Reporter: gün alppay
the following generates an exception
{noformat}
import org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet;
import org.apache.commons.math3.geometry.euclidean.twod.Vector2D;
class Test {
public static void main(String[] args) {
new PolygonsSet(1.0E-10,
new Vector2D(-76.8095991248,
-15.087601999),
new Vector2D(-76.8095991245,
-18.288001999),
new Vector2D(-10.0583778834,
-18.2880019979),
new Vector2D(-10.0583778835,
-15.0876019979),
new Vector2D(-54.8639991264,
-15.0876019984));
}
}
{noformat}
the exception is
{noformat}
Exception in thread "main" java.lang.NullPointerException
at
org.apache.commons.math3.geometry.partitioning.BSPTree.fitToCell(BSPTree.java:301)
at
org.apache.commons.math3.geometry.partitioning.BSPTree.insertCut(BSPTree.java:159)
at
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.insertEdges(PolygonsSet.java:333)
at
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.insertEdges(PolygonsSet.java:406)
at
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.insertEdges(PolygonsSet.java:406)
at
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.insertEdges(PolygonsSet.java:406)
at
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.insertEdges(PolygonsSet.java:406)
at
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.verticesToTree(PolygonsSet.java:309)
at
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.<init>(PolygonsSet.java:156)
at Test.main(test.java:6)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)