There are a question why the output of vtkCubeSource isn’t a closed one?
I write the codes to indicate my thinking. code below.
auto res = vtkSelectEnclosedPoints::IsSurfaceClosed(cube->GetOutput());
and the variable res is always equal to 0, which means the cube isn’t a closed surface.