<p dir="ltr">Nobody on this?<br>
Just to check if I am missing something obvious or there may be a bug in vtkPlaneSource indeed.</p>
<p dir="ltr">Thanks for your comments.</p>
<p dir="ltr">Best regards,</p>
<p dir="ltr">Marco<br>
</p>
<div class="gmail_quote">Il giorno 28/mar/2013 12:15, "Marco Sambin" <<a href="mailto:m.sambin@gmail.com">m.sambin@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi all.<div><br></div><div>I am using the vtkPlaneSource class in a VTK-derived class. I noticed that the following simple sequence of calls:</div><div><br></div><div>=========================</div>
<div>CODE A:</div><div><br></div><div><div>double newO[3];</div><div>double newP1[3];</div><div>double newP2[3];</div><div>double newNormal[3];</div><div><br></div><div>// [...] set new values...</div><div>
<br></div><div>myPlaneSource->SetPoint1(newP1);</div><div>myPlaneSource->SetPoint2(newP2);</div><div>myPlaneSource->SetOrigin(newO);</div><div>myPlaneSource->GetNormal(newNormal);</div></div><div>=========================</div>
<div><br></div><div>finally returns a normal which seems INCORRECT to me.</div><div>On the other side, the following sequence of calls (which differs from CODE A in the position of the SetOrigin() call):</div>
<div><br></div><div><div>=========================</div><div>CODE B:</div><div><br></div><div><div>double newO[3];</div><div>double newP1[3];</div><div>double newP2[3];</div><div>double newNormal[3];</div><div>
<br></div><div>// [...] set new values...</div><div><br></div><div>myPlaneSource->SetOrigin(newO);<br></div><div>myPlaneSource->SetPoint1(newP1);</div><div>myPlaneSource->SetPoint2(newP2);</div><div>myPlaneSource->GetNormal(newNormal);</div>
</div><div>=========================</div><div><br></div><div>finally returns a normal which seems CORRECT.</div><div>After taking a look at vtkPlaneSource.cxx source, I believe that the problem is that while the implementation of the SetPoint1() and SetPoint2() methods finally calls UpdatePlane(), which also updates the normal, the implementation of SetOrigin() does not update the normal. Hence, if SetOrigin() is the last call, the resulting normal is incorrect in my opinion.</div>
<div><br></div><div>Can you please comment?</div><div>Thanks in advance,</div><div><br></div><div>Marco</div><div><br></div></div></div>
</blockquote></div>