def test_face_to_voxel(self): vertices = np.array([ [0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0], ]) voxels = np.array([[0, 1, 2, 3]], dtype=int) mesh = form_mesh(vertices, np.zeros((0, 3)), voxels) attr = np.ones(mesh.num_faces) attr2 = convert_to_voxel_attribute(mesh, attr).ravel() self.assert_array_equal([1], attr2)
def test_face_to_voxel(self): vertices = np.array([ [0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0], ]); voxels = np.array([[0,1,2,3]],dtype=int); mesh = form_mesh(vertices, np.zeros((0, 3)), voxels); attr = np.ones(mesh.num_faces); attr2 = convert_to_voxel_attribute(mesh, attr).ravel(); self.assert_array_equal([1], attr2);