MantisBT - VTK
View Issue Details
0014563VTK(No Category)public2014-02-10 10:302016-08-12 09:55
Gerrick Bivins 
Will Schroeder 
highminorhave not tried
closedmoved 
5.10.1 
 
TBD
incorrect functionality
0014563: vtkPolyDataNormals detecting feature edges incorrectly with vtkCutter
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.
ComputeNormal, hackaton, normal of polygon, polyhedron, VTK
png polydata-normals-with-cutter-bug.png (61,687) 2014-02-10 10:30
https://www.vtk.org/Bug/file/9606/polydata-normals-with-cutter-bug.png
png

png polydata-normals-with-cutter-bug-with-glyphs.png (63,541) 2014-02-10 16:29
https://www.vtk.org/Bug/file/9607/polydata-normals-with-cutter-bug-with-glyphs.png
png
Issue History
2014-02-10 10:30Gerrick BivinsNew Issue
2014-02-10 10:30Gerrick BivinsFile Added: polydata-normals-with-cutter-bug.png
2014-02-10 16:28Gerrick BivinsTag Attached: ComputeNormal
2014-02-10 16:28Gerrick BivinsTag Attached: normal of polygon
2014-02-10 16:28Gerrick BivinsTag Attached: VTK
2014-02-10 16:28Gerrick BivinsTag Attached: polyhedron
2014-02-10 16:29Gerrick BivinsFile Added: polydata-normals-with-cutter-bug-with-glyphs.png
2014-02-12 09:31Gerrick BivinsNote Added: 0032310
2014-10-02 09:45Will SchroederAssigned To => Will Schroeder
2014-10-02 10:02Will SchroederTag Attached: hackaton
2014-10-07 21:09Will SchroederNote Added: 0033615
2014-10-07 21:10Will SchroederNote Added: 0033616
2014-10-07 21:10Will SchroederStatusbacklog => active development
2016-07-06 16:48Berk GeveciStatusactive development => expired
2016-07-06 16:48Berk GeveciNote Added: 0036244
2016-08-12 09:55Kitware RobotNote Added: 0037320
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved

Notes
(0032310)
Gerrick Bivins   
2014-02-12 09:31   
In further testing I was able to work around this by using vtkPolydataNormals in twice.
1) consistency on, splitting and auto-orient off
2) consistency on, splitting on, auto-orient on

Looking at the code, it seems that auto-orient is the root cause in this issue but without it, some output is "dark" ie normals are inward.
(0033615)
Will Schroeder   
2014-10-07 21:09   
Do you have sample data and/or test program? The cutter should not be producing two polygons on top of each other, something else is going on.
(0033616)
Will Schroeder   
2014-10-07 21:10   
Please provide data or example test
(0036244)
Berk Geveci   
2016-07-06 16:48   
Setting to status of bugs that have not been updated in the last year to expired. Please re-open if still important.
(0037320)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.