(self)
| 58 | self.assertEqual(3, len(tri.faces)) |
| 59 | |
| 60 | def test_holes(self): |
| 61 | tri = triangle() |
| 62 | tri.points = np.array([ |
| 63 | [0.0, 0.0], |
| 64 | [1.0, 0.0], |
| 65 | [1.0, 1.0], |
| 66 | [0.0, 1.0], |
| 67 | [0.2, 0.2], |
| 68 | [0.8, 0.2], |
| 69 | [0.8, 0.8], |
| 70 | [0.2, 0.8] ]) |
| 71 | tri.segments = np.array([ |
| 72 | [0, 1], |
| 73 | [1, 2], |
| 74 | [2, 3], |
| 75 | [3, 0], |
| 76 | [5, 4], |
| 77 | [6, 5], |
| 78 | [7, 6], |
| 79 | [4, 7] ]) |
| 80 | tri.holes = np.array([ |
| 81 | [0.5, 0.5] |
| 82 | ]) |
| 83 | tri.verbosity = 0 |
| 84 | tri.run() |
| 85 | mesh = tri.mesh |
| 86 | self.assertEqual(2, mesh.num_boundary_loops) |
| 87 | |
| 88 | def test_auto_hole_detection(self): |
| 89 | tri = triangle() |