David-<br><br>Looking at the code it seems that vtkPlane::IntersectWithLine assumes a unit normal.<br><br>There are several ways to determine where code is being called/tested from. Grep works, admittedly brute force but effective. Or use a debugger and set a break point at a particular function to see where it is invoked. Fancier methods exist, I'll leave it to the better developers to describe.<br>

<br>While I think it's great that you are considering adding tests, remember that every test takes time to run, meaning that the developer's time to make changes, test and check in code increases. Therefore we are optimally looking for a minimal set of tests (and minimal data) to cover the entire code base. Several years ago Ken Martin (and others of the community) went through the exercise of removing extraneous tests and data because it took way too long to run the test suite.<br>

<br>Will<br><br><div class="gmail_quote">On Tue, Feb 2, 2010 at 7:28 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im"><div class="gmail_quote">On Mon, Feb 1, 2010 at 10:54 PM, Francois Bertel <span dir="ltr"><<a href="mailto:francois.bertel@kitware.com" target="_blank">francois.bertel@kitware.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

That would be more object-oriented for sure. Go for it.<br>
<br>
Just be careful that you cannot just pass the normal of the object to<br>
the static method as I don't see in the documentation of the class any<br>
class invariant stating that the magnitude of the normal has to be 1.<br>
On the contrary, the static method DistanceToPlane() explicitly has<br>
the magnitude of the normal to be 1  as a pre-condition.<br>
<div><div></div><div></div></div></blockquote></div><br><div><br></div></div><div>I did notice that some of them require magnitude 1 normals. The only one I plan to add a wrapper for that doesn't mention that is:</div>

<div>
<br></div><div><span style="font-family: 'Lucida Grande',Verdana,Geneva,Arial,sans-serif; font-size: 12px; font-weight: bold; white-space: nowrap;">static int vtkPlane::IntersectWithLine</span></div>
<div><span style="font-family: 'Lucida Grande',Verdana,Geneva,Arial,sans-serif; font-size: 12px; font-weight: bold; white-space: nowrap;"><br>
</span></div><div><font face="'Lucida Grande', Verdana, Geneva, Arial, sans-serif" size="3"><span style="font-size: 12px; white-space: nowrap;"><b><span style="font-family: arial; font-weight: normal; white-space: normal; font-size: small;">anyone know off the top of their head if this algorithm requires a unit normal?</span></b></span></font></div>


<div><br></div><div>Also, I was going to add tests for the new functions, but I noticed there is not a VTK/Common/Cxx/Testing/TestPlane.cxx. However, the coverage seems fine:</div><div><br></div><div><a href="http://www.cdash.org/CDash/viewCoverageFile.php?buildid=529419&fileid=10953777" target="_blank">http://www.cdash.org/CDash/viewCoverageFile.php?buildid=529419&fileid=10953777</a></div>


<div><br></div><div>Where would this be getting tested from? Should we make a TestPlane.cxx?</div><div><br clear="all">Thanks,<br><font color="#888888"><br>David</font></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><br>-- <br>William J. Schroeder, PhD<br>Kitware, Inc.<br>28 Corporate Drive<br>Clifton Park, NY 12065<br><a href="mailto:will.schroeder@kitware.com">will.schroeder@kitware.com</a><br>

<a href="http://www.kitware.com">http://www.kitware.com</a><br>(518) 881-4902<br>
<input id="gwProxy" type="hidden"><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML"></div>