<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal">I’ve run into a situation where vtkPolyDataNormals is producing “incorrect” results for a plane in the x vs a plane in the y.<o:p></o:p></p>
<p class="MsoNormal">Using the default settings for “FeatureAngle” ie 30, and creating a slice plane in the x and y directions of my dataset, the attached<o:p></o:p></p>
<p class="MsoNormal">result is produced. (see <a href="http://vtk.org/Bug/view.php?id=14563">
mantis</a> bug)<o:p></o:p></p>
<p class="MsoNormal">The issue is the edge is being detected as a “FeatureEdge” and so it’s vertices are duplicated, despite the faces being coplanar.<o:p></o:p></p>
<p class="MsoNormal">So when I looked at the code in vtkPolyDataNormals, I found the following code:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">if ( vtkMath::Dot(thisNormal,neiNormal) > CosAngle )<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> //found feature edge<o:p></o:p></p>
<p class="MsoNormal">….<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In my case, the CosAngle is cos(30) so this is positive but I’m guessing(because I’m just looking at the code)<o:p></o:p></p>
<p class="MsoNormal">that the cutter has produced polygons whose normals are opposite each other, ie 180 so this is ~ -1, which is less than cos(30),<o:p></o:p></p>
<p class="MsoNormal">which results in the duplication of the vertices.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there a way around this without modifying VTK source? I tried calling polydatanormals in two passes,<o:p></o:p></p>
<p class="MsoNormal">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<o:p></o:p></p>
<p class="MsoNormal">to have an effect on the output.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Gerrick<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a href="https://www.landmarksoftware.com/Pages/DefaultHome.aspx" title=""Your Enterprise is Bigger than a Desktop" "><span style="font-size:13.5pt;color:blue;text-decoration:none"><img border="0" width="800" height="115" id="Picture_x0020_1" src="cid:image001.jpg@01CF263A.639C9AC0" alt="Your Enterprise is Bigger than a Desktop"></span></a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<HR>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.<BR>
</body>
</html>