vtkPolyDataNormals detecting feature edges incorrectly with vtkCutter
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Hi All, I’ve run into a situation where vtkPolyDataNormals is producing “incorrect” results for a plane in the x vs a plane in the y. Using the default settings for “FeatureAngle” ie 30, and creating a slice plane in the x and y directions of my dataset, the attached result is produced. The issue is the edge is being detected as a “FeatureEdge” and so it’s vertices are duplicated, despite the faces being coplanar. So when I looked at the code in vtkPolyDataNormals, I found the following code:
if ( vtkMath::Dot(thisNormal,neiNormal) > CosAngle ) { //found feature edge …. }
In my case, the CosAngle is cos(30) so this is positive but I’m guessing(because I’m just looking at the code) that the cutter has produced polygons whose normals are opposite each other, ie 180 so this is ~ -1, which is less than cos(30), which results in the duplication of the vertices.
Is there a way around this without modifying VTK source? I tried calling polydatanormals in two passes, one that does the orientation and then connect the output of that to a new polydatanormals that only performs the splitting but this didn’t seem to have an effect on the output.