(self)
| 86 | self.assertEqual(2, mesh.num_boundary_loops) |
| 87 | |
| 88 | def test_auto_hole_detection(self): |
| 89 | tri = triangle() |
| 90 | tri.points = np.array([ |
| 91 | [0.0, 0.0], |
| 92 | [1.0, 0.0], |
| 93 | [1.0, 1.0], |
| 94 | [0.0, 1.0], |
| 95 | [0.2, 0.2], |
| 96 | [0.8, 0.2], |
| 97 | [0.8, 0.8], |
| 98 | [0.2, 0.8] ]) |
| 99 | tri.segments = np.array([ |
| 100 | [0, 1], |
| 101 | [1, 2], |
| 102 | [2, 3], |
| 103 | [3, 0], |
| 104 | [5, 4], |
| 105 | [6, 5], |
| 106 | [7, 6], |
| 107 | [4, 7] ]) |
| 108 | tri.auto_hole_detection = True |
| 109 | tri.verbosity = 0 |
| 110 | tri.run() |
| 111 | mesh = tri.mesh |
| 112 | self.assertEqual(2, mesh.num_boundary_loops) |