Fix T37946: Error filling ngons
authorCampbell Barton <ideasman42@gmail.com>
Thu, 26 Dec 2013 01:05:42 +0000 (12:05 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 26 Dec 2013 01:06:52 +0000 (12:06 +1100)
source/blender/blenlib/intern/polyfill2d.c

index 287a090987078c31f2ce0074bf257ae13eaf88fa..56cd385e76b39380c80151f5a63d462ae4b027c0 100644 (file)
@@ -316,9 +316,9 @@ static bool pf_ear_tip_check(PolyFill *pf, const unsigned int index_ear_tip)
                        /* Because the polygon has clockwise winding order,
                         * the area sign will be positive if the point is strictly inside.
                         * It will be 0 on the edge, which we want to include as well. */
-                       if ((span_tri_v2_sign(v1, v2, v) == CONVEX) &&
-                           (span_tri_v2_sign(v2, v3, v) == CONVEX) &&
-                           (span_tri_v2_sign(v3, v1, v) == CONVEX))
+                       if ((span_tri_v2_sign(v1, v2, v) != CONCAVE) &&
+                           (span_tri_v2_sign(v2, v3, v) != CONCAVE) &&
+                           (span_tri_v2_sign(v3, v1, v) != CONCAVE))
                        {
                                return false;
                        }