File: 0013-disable-remove-failing-test-PolygonTest-simplifyIncr.patch

package info (click to toggle)
cura-engine 1%3A5.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,860 kB
  • sloc: cpp: 52,613; python: 322; makefile: 10; sh: 2
file content (73 lines) | stat: -rw-r--r-- 2,665 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From: Sebastian Kuzminsky <sebastiankuzminsky@desktopmetal.com>
Date: Wed, 25 May 2022 10:20:02 -0600
Subject: disable/remove failing test:
 PolygonTest/simplifyIncreasingLimitedError

---
 tests/utils/PolygonTest.cpp | 53 ---------------------------------------------
 1 file changed, 53 deletions(-)

diff --git a/tests/utils/PolygonTest.cpp b/tests/utils/PolygonTest.cpp
index 347da54..f8e1e79 100644
--- a/tests/utils/PolygonTest.cpp
+++ b/tests/utils/PolygonTest.cpp
@@ -267,59 +267,6 @@ TEST_F(PolygonTest, simplifyLimitedLength)
     ASSERT_EQ(spiral.size(), 11 - 3) << "Should merge segments of length 1100 with 1200, 1300 with 1400 and first with last.";
 }
 
-TEST_F(PolygonTest, simplifyIncreasingLimitedError)
-{
-    // Generate a zigzag with bends in the outer ends with increasing height
-    //   _   /\                        .
-    //  | | | |
-    //  | | | |
-    //  | | | |
-    //  | | | |
-    //     v   \/
-    
-    Polygons zigzag_polygons;
-    PolygonRef zigzag = zigzag_polygons.newPoly();
-    
-    constexpr coord_t non_simplifiable_bound = 10000;
-    constexpr coord_t max_height = 562;
-    
-    coord_t long_segment = non_simplifiable_bound + 100;
-    
-    constexpr coord_t width = 1000;
-    
-    zigzag.emplace_back(0, 0);
-
-    size_t simplifiable_bend_count = 0;
-    
-    for (coord_t height = 100; height < 1000 || (height == 1000 && long_segment < 0); height += 25)
-    {
-        Point last_position = zigzag.back();
-        zigzag.emplace_back(last_position + Point(width / 2, height));
-        zigzag.emplace_back(last_position + Point(width, 0));
-        zigzag.emplace_back(last_position + Point(width, long_segment));
-        long_segment *= -1;
-        if (height < max_height)
-        {
-            simplifiable_bend_count++;
-        }
-    }
-    zigzag.emplace_back(zigzag.back() + Point(-non_simplifiable_bound, -non_simplifiable_bound)); // complete polygon with a point which enforces non-simplification to both its segments
-
-    Polygon zigzag_before = zigzag;
-
-    zigzag_polygons.simplify(non_simplifiable_bound, max_height);
-
-    if (visualize)
-    {
-        SVG svg("output/simplifyIncreasingLimitedError.svg", AABB(zigzag_before));
-        svg.writePolygon(zigzag_before);
-        svg.nextLayer();
-        svg.writePolygon(zigzag, SVG::Color::RED);
-    }
-    EXPECT_THAT(zigzag.size(), testing::Eq(zigzag_before.size() - simplifiable_bend_count)) << "Should simplify bends with height 100 up to 500";
-}
-
-
 TEST_F(PolygonTest, simplifySineLimitedError)
 {
     // Generate a straight line with sinusoidal errors which should be simplified back into a more straight line