def test_mesh_n_triangles02(self): mesh1 = Mesh(vertices=np.arange(5), polygon_vertex_indices=[ [0, 1, 2], [4, 5, 6, 8], ]) self.assertIsNone(mesh1.n_triangles()) self.assertFalse(mesh1.is_triangulated())
def test_mesh_n_triangles01(self): mesh1 = Mesh(vertices=np.arange(5), polygon_vertex_indices=[ [0, 1, 2], [4, 5, 6, 8], ], triangle_vertex_indices=np.array([ [0, 1, 2], [4, 5, 6], [4, 6, 8], ])) self.assertEqual(mesh1.n_triangles(), 3) self.assertTrue(mesh1.is_triangulated())