public double[] getMinMax() {
        if ( contourCurve != null ) {
            return contourCurve.getMinMax();
        }
        else {
            // This gives convex hull's minmax
            double minX = Double.MAX_VALUE;
            double minY = Double.MAX_VALUE;
            double minZ = Double.MAX_VALUE;
            double maxX = -Double.MAX_VALUE;
            double maxY = -Double.MAX_VALUE;
            double maxZ = -Double.MAX_VALUE;
            double minMax[] = new double[6];
            int i, j;

            for ( i = 0; i < 4; i++ ) {
                for ( j = 0; j < 4; j++ ) {
                    Vector3D p = controlMeshPoints[i][j];

                    if ( p.x < minX ) minX = p.x;
                    if ( p.y < minY ) minY = p.y;
                    if ( p.z < minZ ) minZ = p.z;
                    if ( p.x > maxX ) maxX = p.x;
                    if ( p.y > maxY ) maxY = p.y;
                    if ( p.z > maxZ ) maxZ = p.z;
                }
            }
            minMax[0] = minX;
            minMax[1] = minY;
            minMax[2] = minZ;
            minMax[3] = maxX;
            minMax[4] = maxY;
            minMax[5] = maxZ;
            return minMax;
        }
    }