Booleans: epsilon for planar checks seems a bit too small for single precision math
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 5 Oct 2012 07:31:30 +0000 (07:31 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 5 Oct 2012 07:31:30 +0000 (07:31 +0000)
This could solve issue #32748: Boolean Modifiers Making unneeded edges?

intern/bsp/intern/BOP_CarveInterface.cpp

index 255d885007c39432f15424bd9c7b1b5f061fefc4..1f9c989cbc8e665277beb47c107cd8a5b5abff20 100644 (file)
@@ -58,7 +58,7 @@ static bool isQuadPlanar(carve::geom3d::Vector &v1, carve::geom3d::Vector &v2,
        cross = carve::geom::cross(vec1, vec2);
 
        float production = carve::geom::dot(cross, vec3);
-       float magnitude = 1e-6 * cross.length();
+       float magnitude = 1e-5 * cross.length();
 
        return fabs(production) < magnitude;
 }