(self)
| 8 | |
| 9 | class CutMeshTest(TestCase): |
| 10 | def test_square(self): |
| 11 | vertices = np.array([ |
| 12 | [ 0.0, 0.0, 0.0], |
| 13 | [ 1.0, 0.0, 0.0], |
| 14 | [ 0.0, 1.0, 0.0], |
| 15 | [ 1.0, 1.0, 0.0], |
| 16 | ], dtype=float) |
| 17 | faces = np.array([ |
| 18 | [0, 1, 2], |
| 19 | [2, 1, 3], |
| 20 | ], dtype=int) |
| 21 | |
| 22 | mesh = form_mesh(vertices, faces) |
| 23 | cutted_mesh = cut_mesh(mesh, [0, 1]) |
| 24 | |
| 25 | self.assertEqual(6, cutted_mesh.num_vertices) |
| 26 | self.assertEqual(2, cutted_mesh.num_components) |
| 27 | |
| 28 | def test_square_2(self): |
| 29 | vertices = np.array([ |