# Why vtkCubeSource isn't a closed surface?

**URL:** https://discourse.vtk.org/t/why-vtkcubesource-isnt-a-closed-surface/8143
**Category:** Support
**Created:** [March 25, 2022, 7:33am UTC](https://discourse.vtk.org/t/why-vtkcubesource-isnt-a-closed-surface/8143 "2022-03-25T07:33:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![xianger.qi](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/x/f14d63/32.png) [@xianger.qi](https://discourse.vtk.org/u/xianger.qi)
#### Post date: [March 25, 2022, 7:33am UTC](https://discourse.vtk.org/t/why-vtkcubesource-isnt-a-closed-surface/8143/1 "2022-03-25T07:33:28Z")

</div>

Hey All:  
There are a question why the output of vtkCubeSource isn’t a closed one?  
I write the codes to indicate my thinking. code below.

vtkNew《vtkCubeSource》 cube;  
auto res = vtkSelectEnclosedPoints::IsSurfaceClosed(cube-\>GetOutput());

and the variable res is always equal to 0, which means the cube isn’t a closed surface.

---

<div class="post-metadata">

### Author: ![marcomusy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/marcomusy/32/95_2.png) [@marcomusy](https://discourse.vtk.org/u/marcomusy)
#### Post date: [March 25, 2022, 12:40pm UTC](https://discourse.vtk.org/t/why-vtkcubesource-isnt-a-closed-surface/8143/2 "2022-03-25T12:40:01Z")

</div>

It’s because vertices are duplicated to allow computation of normals (I believe). E.g.

```python
from vedo import Cube
cube = Cube()
print(cube.isClosed())
cube.clean() # remove coincident vertices
print(cube.isClosed())

```

> False  
> True

---

<div class="post-metadata">

### Author: ![xianger.qi](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/x/f14d63/32.png) [@xianger.qi](https://discourse.vtk.org/u/xianger.qi)
#### Post date: [March 28, 2022, 1:38am UTC](https://discourse.vtk.org/t/why-vtkcubesource-isnt-a-closed-surface/8143/3 "2022-03-28T01:38:16Z")

</div>

Thans a lot, After i removed the duplicated points and the cube be a closed one.
