diff options
Diffstat (limited to 'source/blender/blenlib/intern/polyfill2d.c')
-rw-r--r-- | source/blender/blenlib/intern/polyfill2d.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/polyfill2d.c b/source/blender/blenlib/intern/polyfill2d.c index 3aadbe5f1df..df6caa4b65a 100644 --- a/source/blender/blenlib/intern/polyfill2d.c +++ b/source/blender/blenlib/intern/polyfill2d.c @@ -61,6 +61,9 @@ # define USE_KDTREE #endif +/* disable in production, it can fail on near zero area ngons */ +// #define USE_STRICT_ASSERT + // #define DEBUG_TIME #ifdef DEBUG_TIME # include "PIL_time_utildefines.h" @@ -179,7 +182,7 @@ BLI_INLINE eSign signum_enum(float a) * alternative version of #area_tri_signed_v2 * needed because of float precision issues * - * \note removes / 2 since its not needed since we only need ths sign. + * \note removes / 2 since its not needed since we only need the sign. */ BLI_INLINE float area_tri_signed_v2_alt_2x(const float v1[2], const float v2[2], const float v3[2]) { @@ -797,6 +800,7 @@ static void polyfill_prepare( } else { /* chech we're passing in correcty args */ +#ifdef USE_STRICT_ASSERT #ifndef NDEBUG if (coords_sign == 1) { BLI_assert(cross_poly_v2(coords, coords_tot) >= 0.0f); @@ -805,6 +809,7 @@ static void polyfill_prepare( BLI_assert(cross_poly_v2(coords, coords_tot) <= 0.0f); } #endif +#endif } if (coords_sign == 1) { |