public static Double distanceFromPoint(Point3D A, Point3D B) {
        if (A == null || B == null) return 0.0;
        if (B == A) return 0.0;
        if (!(A instanceof Point3D) || !(B instanceof Point3D)) return 0.0;
        if (A.isNull() || B.isNull()) return 0.0;

        return Math.sqrt(Math.pow((A.getOriginalX() - B.getOriginalX()), 2) + Math.pow((A.getOriginalY() - B.getOriginalY()), 2) + Math.pow((A.getOriginalZ() - B.getOriginalZ()), 2));
    }