[Bf-blender-cvs] [fa1d4706928] master: GTest: test cases for polyfill2d bug T67109

Campbell Barton noreply at git.blender.org
Mon Aug 5 14:45:50 CEST 2019


Commit: fa1d47069288bde694d4c3e7284c7f0249d4f632
Author: Campbell Barton
Date:   Mon Aug 5 22:37:21 2019 +1000
Branches: master
https://developer.blender.org/rBfa1d47069288bde694d4c3e7284c7f0249d4f632

GTest: test cases for polyfill2d bug T67109

===================================================================

M	tests/gtests/blenlib/BLI_polyfill_2d_test.cc

===================================================================

diff --git a/tests/gtests/blenlib/BLI_polyfill_2d_test.cc b/tests/gtests/blenlib/BLI_polyfill_2d_test.cc
index 9b908bf4cad..5566dced798 100644
--- a/tests/gtests/blenlib/BLI_polyfill_2d_test.cc
+++ b/tests/gtests/blenlib/BLI_polyfill_2d_test.cc
@@ -697,3 +697,58 @@ TEST(polyfill2d, IssueT52834_axis_align_co_linear)
 
   TEST_POLYFILL_TEMPLATE_STATIC(poly, false);
 }
+
+/* Blender bug T67109 (version a). */
+/* Multiple versions are offset & rotated, this fails in cases where others works. */
+TEST(polyfill2d, IssueT67109_axis_align_co_linear_a)
+{
+  const float poly[][2] = {
+      {3.2060661, -11.438997},
+      {2.8720665, -5.796999},
+      {-2.8659325, -5.796999},
+      {-2.8659325, -8.307999},
+      {-3.2549324, -11.438997},
+      {-2.8659325, -5.4869995},
+      {2.8720665, -5.4869995},
+      {2.8720665, -2.9759989},
+      {2.8720665, -2.6659985},
+      {2.8720665, -0.15499878},
+  };
+  TEST_POLYFILL_TEMPLATE_STATIC(poly, false);
+}
+
+/* Blender bug T67109, (version b). */
+TEST(polyfill2d, IssueT67109_axis_align_co_linear_b)
+{
+  const float poly[][2] = {
+      {32.41416, -12.122593},
+      {28.094929, -8.477332},
+      {24.141455, -12.636018},
+      {25.96133, -14.366093},
+      {27.96254, -16.805279},
+      {23.916779, -12.422427},
+      {27.870255, -8.263744},
+      {26.050375, -6.533667},
+      {25.825695, -6.320076},
+      {24.00582, -4.5899982},
+  };
+  TEST_POLYFILL_TEMPLATE_STATIC(poly, false);
+}
+
+/* Blender bug T67109 (version c). */
+TEST(polyfill2d, IssueT67109_axis_align_co_linear_c)
+{
+  const float poly[][2] = {
+      {-67.10034, 43.677097},
+      {-63.253956, 61.399143},
+      {-80.98382, 66.36057},
+      {-83.15499, 58.601795},
+      {-87.06422, 49.263668},
+      {-80.71576, 67.31843},
+      {-62.985912, 62.35701},
+      {-60.81475, 70.11576},
+      {-60.546703, 71.07365},
+      {-58.37554, 78.83239},
+  };
+  TEST_POLYFILL_TEMPLATE_STATIC(poly, false);
+}



More information about the Bf-blender-cvs mailing list