# vtkPoissonReconstruction (vtkPCANormalEstimation) errors, flipped surface normals

**URL:** https://discourse.vtk.org/t/vtkpoissonreconstruction-vtkpcanormalestimation-errors-flipped-surface-normals/1939
**Category:** Support
**Created:** [October 16, 2019, 5:43pm UTC](https://discourse.vtk.org/t/vtkpoissonreconstruction-vtkpcanormalestimation-errors-flipped-surface-normals/1939 "2019-10-16T17:43:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sbucc](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@sbucc](https://discourse.vtk.org/u/sbucc)
#### Post date: [October 16, 2019, 5:43pm UTC](https://discourse.vtk.org/t/vtkpoissonreconstruction-vtkpcanormalestimation-errors-flipped-surface-normals/1939/1 "2019-10-16T17:43:17Z")

</div>

Hi, I’m using vtkPoissonReconstruction to rebuild a mesh, with code that pretty much copies the example in [https://lorensen.github.io/VTKExamples/site/Cxx/Points/PoissonExtractSurface/](https://lorensen.github.io/VTKExamples/site/Cxx/Points/PoissonExtractSurface/). It works fine on most input meshes, but occasionally it produces horrible results, essentially the mesh bulges outwards in patches. I’m pretty sure this is caused by vtkPCANormalEstimation generating inconsistent normals, with sudden flips inwards, but I can’t find a way to stop it from happening. vtkPoissonReconstruction is not a requirement, all I need is something that takes a mesh as input, a bit irregular and with possible folds, and spits out the outer envelope, smoothed out, disregarding existing edges and interpolating the existing vertices. Any suggestions?
