[vtkusers] vtkPolyDataNormals detecting feature edges incorrectly with vtkCutter
Gerrick Bivins
Gerrick.Bivins at halliburton.com
Mon Feb 10 11:16:06 EST 2014
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. (see mantis<http://vtk.org/Bug/view.php?id=14563> bug)
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.
Gerrick
[Your Enterprise is Bigger than a Desktop]<https://www.landmarksoftware.com/Pages/DefaultHome.aspx>
----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140210/f5e91ca8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 134818 bytes
Desc: image001.jpg
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140210/f5e91ca8/attachment-0001.jpg>
More information about the vtkusers
mailing list