diff --git a/src/main/java/org/apache/commons/math/geometry/euclidean/threed/OutlineExtractor.java b/src/main/java/org/apache/commons/math/geometry/euclidean/threed/OutlineExtractor.java index 1d6b7dd8e..8c8d48001 100644 --- a/src/main/java/org/apache/commons/math/geometry/euclidean/threed/OutlineExtractor.java +++ b/src/main/java/org/apache/commons/math/geometry/euclidean/threed/OutlineExtractor.java @@ -163,11 +163,11 @@ public class OutlineExtractor { final AbstractSubHyperplane absFacet = (AbstractSubHyperplane) facet; final Plane plane = (Plane) facet.getHyperplane(); - Vector2D[][] vertices = - ((PolygonsSet) absFacet.getRemainingRegion()).getVertices(); final double scal = Vector3D.dotProduct(plane.getNormal(), w); if (FastMath.abs(scal) > 1.0e-3) { + Vector2D[][] vertices = + ((PolygonsSet) absFacet.getRemainingRegion()).getVertices(); if ((scal < 0) ^ reversed) { // the facet is seen from the inside,