# How to check disconnected vertices in a triangular mesh

**URL:** https://discourse.vtk.org/t/how-to-check-disconnected-vertices-in-a-triangular-mesh/2593
**Category:** Development
**Created:** [February 12, 2020, 4:04pm UTC](https://discourse.vtk.org/t/how-to-check-disconnected-vertices-in-a-triangular-mesh/2593 "2020-02-12T16:04:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![srbn.ghosh99](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/cdc98d/32.png) [@srbn.ghosh99](https://discourse.vtk.org/u/srbn.ghosh99)
#### Post date: [February 12, 2020, 4:04pm UTC](https://discourse.vtk.org/t/how-to-check-disconnected-vertices-in-a-triangular-mesh/2593/1 "2020-02-12T16:04:07Z")

</div>

Hello Everyone,

I have a triangular mesh that has 1038458 polygons, 517817 points, 1557687 edges. During the simplification process, I am getting the message that there are 1092 disconnected vertices, 516725 connected vertices. Because of disconnected components, the simplification is not improving as expected Using VTK how can I check which vertices are disconnected and color them so I can visualize them clearly and can dig into them.

Any suggestions will be helpful.

I have attached the mesh file here.  
[https://drive.google.com/open?id=1rRVLig6sSpAzXCkI5CDNKFaWeK2Cpw9N](https://drive.google.com/open?id=1rRVLig6sSpAzXCkI5CDNKFaWeK2Cpw9N)

Regards  
Shrabani Ghosh

---

<div class="post-metadata">

### Author: ![efahl](https://discourse.vtk.org/user_avatar/discourse.vtk.org/efahl/32/1087_2.png) [@efahl](https://discourse.vtk.org/u/efahl)
#### Post date: [February 12, 2020, 10:15pm UTC](https://discourse.vtk.org/t/how-to-check-disconnected-vertices-in-a-triangular-mesh/2593/2 "2020-02-12T22:15:01Z")

</div>

Take a look at the [vtkFeatureEdges class](https://vtk.org/doc/nightly/html/classvtkFeatureEdges.html), it sounds from your description that this is exactly what you’re looking for.

---

<div class="post-metadata">

### Author: ![srbn.ghosh99](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/cdc98d/32.png) [@srbn.ghosh99](https://discourse.vtk.org/u/srbn.ghosh99)
#### Post date: [February 13, 2020, 5:41pm UTC](https://discourse.vtk.org/t/how-to-check-disconnected-vertices-in-a-triangular-mesh/2593/3 "2020-02-13T17:41:27Z")

</div>

When I applied the feature edges. It shows a lot of coloring of feature edges. Which feature should I use to see the disconnected vertices? And how to resolve that problem?

Regards  
Shrabani Ghosh

---

<div class="post-metadata">

### Author: ![efahl](https://discourse.vtk.org/user_avatar/discourse.vtk.org/efahl/32/1087_2.png) [@efahl](https://discourse.vtk.org/u/efahl)
#### Post date: [February 13, 2020, 7:31pm UTC](https://discourse.vtk.org/t/how-to-check-disconnected-vertices-in-a-triangular-mesh/2593/4 "2020-02-13T19:31:00Z")

</div>

1. Boundary edges are used by exactly one polygon, or defined by a line cell.
2. Feature edges are shared by two polygons and whose dihedral angle \> featureAngle.
3. Manifold edges are shared by exactly two polygons.
4. Non-manifold edges are shared by three or more polygons.

If the sum of boundary edges (1) and non-manifold edges (4) is greater than zero, then the geometry does not define a closed surface.

So for a “pure surface” with no expected internal geometry, to find extraneous junk I turn on only boundary edges; to find pathological connections, I turn on only non-manifold edges. From the edges you can chase back into the points or whatever and diagnose the appropriate bits.
