# How does VTK implement model error detection and repair?

**URL:** <https://discourse.vtk.org/t/how-does-vtk-implement-model-error-detection-and-repair/5731>\
**Category:** Development\
**Created:** [May 7, 2021, 10:27am UTC](https://discourse.vtk.org/t/how-does-vtk-implement-model-error-detection-and-repair/5731 "2021-05-07T10:27:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Koly](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@Koly](https://discourse.vtk.org/u/Koly)\
**Post date:** [May 7, 2021, 10:27am UTC](https://discourse.vtk.org/t/how-does-vtk-implement-model-error-detection-and-repair/5731/1 "2021-05-07T10:27:58Z")

</div>

How does VTK implement model error detection and repair?  
I want to implement the function that is checking bad edges、holes、Bad triangle（including bad orientation、intersections、Overlap）and repairing them. How VTK to do it?

---

<div class="post-metadata">

**Author:** ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)\
**Post date:** [May 7, 2021, 10:42am UTC](https://discourse.vtk.org/t/how-does-vtk-implement-model-error-detection-and-repair/5731/2 "2021-05-07T10:42:35Z")

</div>

I believe TTK as great tools for that.

@Charles_Gueunet

---

<div class="post-metadata">

**Author:** ![Charles\_Gueunet](https://discourse.vtk.org/user_avatar/discourse.vtk.org/charles_gueunet/32/239_2.png) [@Charles\_Gueunet](https://discourse.vtk.org/u/Charles_Gueunet)\
**Post date:** [May 7, 2021, 11:33am UTC](https://discourse.vtk.org/t/how-does-vtk-implement-model-error-detection-and-repair/5731/3 "2021-05-07T11:33:16Z")

</div>

What type of data set are you using ? Surface or Volume ?

TTK may help you find holes and bad neighborhoods as these are topological information.  
For overlap or bad orientation, you may try Blender which also have some tools for mesh reparation.

(VTK itself focuses more on mesh visualization and does not offer much tools for the mesh reparation)

---

<div class="post-metadata">

**Author:** ![Koly](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@Koly](https://discourse.vtk.org/u/Koly)\
**Post date:** [May 10, 2021, 6:13am UTC](https://discourse.vtk.org/t/how-does-vtk-implement-model-error-detection-and-repair/5731/4 "2021-05-10T06:13:59Z")

</div>

Thanks. I am using triangular surface data in stl format.
