<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=koi8-r">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
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;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:8.5in 11.0in;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
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="NL" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I have a performance problem when I use vtkExtractSelectedIds with including the containing cells. I was studying the code and found a strange for-loop in the block below (vtkExtractSelectedIds.cxx v5.10, line 870). The
loop variable j is used both in the 1<sup>st</sup> for-loop and in the 3<sup>rd</sup> for-loop. The first for-loop’s j value is never used, but it gets reset to a low value every time the if-statement above the 3<sup>rd</sup> for-loop is true. I suspect this
is not intended.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> if (containingCells)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> for (vtkIdType j = 0; j < input->GetNumberOfPoints(); j++)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> input->GetPointCells(ptId, ptCells);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> for (i = 0; i < ptCells->GetNumberOfIds(); ++i)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> cellId = ptCells->GetId(i);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> if (!passThrough && !invert && cellInArray->GetValue(cellId) != flag)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> input->GetCellPoints(cellId, cellPts);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> for (j = 0; j < cellPts->GetNumberOfIds(); ++j)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> pointInArray->SetValue(cellPts->GetId(j), flag);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New"">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> cellInArray->SetValue(cellId, flag);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> }<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:NL">Andreas Buykx<o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:NL">Senior Software Engineer<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:NL"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:11.5pt;font-family:"Arial","sans-serif";color:#CB2027;mso-fareast-language:NL">TNO DIANA BV
</span></b><span lang="EN-US" style="font-size:11.5pt;font-family:"Arial","sans-serif";color:#CB2027;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:NL">Software Developers and Analysis Consultants for Civil and Geotechnical Engineering
<o:p></o:p></span></i></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:NL"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:NL">Delftechpark 19a, 2628 XJ, Delft, The Netherlands
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:NL">Tel: +31 88 34262 15 (Direct)
</span><span lang="EN-US" style="color:black;mso-fareast-language:NL"> Tel: +31 88 34262 00 (Switchboard) +31 88 34262 99 (Fax)
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:NL"><a href="http://tnodiana.com/"><span lang="EN-US">http://tnodiana.com</span></a></span><b><i><span style="font-size:9.0pt;mso-fareast-language:NL">
<span lang="EN-US"><o:p></o:p></span></span></i></b></p>
<p class="MsoNormal" style="text-autospace:none"><b><i><span lang="EN-US" style="font-size:9.0pt;mso-fareast-language:NL"><o:p> </o:p></span></i></b></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="font-size:9.0pt;mso-fareast-language:NL">…be green keep it on screen</span></i></b><span lang="EN-US" style="mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<font face="monospace">____________________________________________________________<br>
TNO DIANA BV is a limited liability company registered in the trade register of the Chamber of Commerce as TNO DIANA BV with registered number 27252655.<br>
____________________________________________________________<br>
This e-mail and its contents are subject to the DISCLAIMER at http://tnodiana.com/content/Disclaimer<br>
____________________________________________________________</font></body>
</html>