<div dir="ltr">Hi all.<div><br></div><div style>I am using the vtkPlaneSource class in a VTK-derived class. I noticed that the following simple sequence of calls:</div><div style><br></div><div style>=========================</div>
<div style>CODE A:</div><div style><br></div><div style><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 style>=========================</div>
<div style><br></div><div style>finally returns a normal which seems INCORRECT to me.</div><div style>On the other side, the following sequence of calls (which differs from CODE A in the position of the SetOrigin() call):</div>
<div style><br></div><div style><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 style>finally returns a normal which seems CORRECT.</div><div style>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 style><br></div><div style>Can you please comment?</div><div style>Thanks in advance,</div><div style><br></div><div style>Marco</div><div style><br></div></div></div>